mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
recent_topics_ui: Adjust filter classes once they are displayed.
Updating filters before rendering recent conversations leads to bugs if the filters changed or recent topics was not the first view that was loaded.
This commit is contained in:
@@ -783,8 +783,6 @@ export function complete_rerender() {
|
||||
return;
|
||||
}
|
||||
|
||||
show_selected_filters();
|
||||
|
||||
// Show topics list
|
||||
const mapped_topic_values = Array.from(get().values()).map((value) => value);
|
||||
|
||||
@@ -802,6 +800,13 @@ export function complete_rerender() {
|
||||
is_spectator: page_params.is_spectator,
|
||||
});
|
||||
$("#recent_topics_table").html(rendered_body);
|
||||
|
||||
// `show_selected_filters` needs to be called after the Recent
|
||||
// Conversations view has been added to the DOM, to ensure that filters
|
||||
// have the correct classes (checked or not) if Recent Conversations
|
||||
// was not the first view loaded in the app.
|
||||
show_selected_filters();
|
||||
|
||||
const $container = $("#recent_topics_table table tbody");
|
||||
$container.empty();
|
||||
topics_widget = ListWidget.create($container, mapped_topic_values, {
|
||||
|
||||
Reference in New Issue
Block a user