recent_topics: Improve behaviour of inplace rerender.

We used to hide and show topic rows in the DOM when topics are
updated. This resulted in incorrect calculations in the length of
visible topics. As a consequence, focus is sometimes set to hidden topic.
Removing hidden topics from DOM helps us keep
the calculations correct.

The fixes bugs related to focus being lost when trying to mute
or mark as read the last row.
This commit is contained in:
Aman Agrawal
2022-10-29 13:55:36 +00:00
committed by Tim Abbott
parent ef067eafad
commit c41c94e36e
3 changed files with 68 additions and 16 deletions

View File

@@ -172,7 +172,9 @@ export function create($container, list, opts) {
return undefined;
}
const widget = {};
const widget = {
meta,
};
widget.get_current_list = function () {
return meta.filtered_list;