Fix scrolling glitches when zooming out to streams.

If you go into "more topics" for a stream with many topics,
and then scroll down, and then zoom out again with "All
streams", we make sure the active stream is still in view.
This commit is contained in:
Steve Howell 2017-08-10 06:04:01 -04:00 committed by Tim Abbott
parent 9dd78c803c
commit 9201137059
2 changed files with 8 additions and 1 deletions

View File

@ -182,6 +182,10 @@ function zoom_out(options) {
popovers.hide_all(); popovers.hide_all();
topic_list.zoom_out(options); topic_list.zoom_out(options);
if (options.stream_li) {
exports.scroll_to_active_stream(options.stream_li);
}
// Show stream list titles and pinned stream splitter // Show stream list titles and pinned stream splitter
$(".stream-filters-label").each(function () { $(".stream-filters-label").each(function () {
$(this).show(); $(this).show();

View File

@ -210,7 +210,10 @@ exports.set_click_handlers = function (callbacks) {
}); });
$('.show-all-streams').on('click', function (e) { $('.show-all-streams').on('click', function (e) {
callbacks.zoom_out({clear_topics: false}); callbacks.zoom_out({
clear_topics: false,
stream_li: active_widget.get_parent(),
});
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();