stream_list: Set filter_out_inactives before rendering.

When initializing the app or re-rendering left sidebar to update
the `demote_inactive_streams` property, we need to update
`filter_out_inactives` property first.

(cherry picked from commit 737acb1cb1)
This commit is contained in:
Aman Agrawal
2025-03-25 12:27:55 +05:30
committed by Tim Abbott
parent f902a39ac9
commit b78307d559
2 changed files with 2 additions and 2 deletions

View File

@@ -901,8 +901,8 @@ export function dispatch_normal_event(event) {
$("body").toggleClass("high-contrast");
}
if (event.property === "demote_inactive_streams") {
stream_list.update_streams_sidebar();
stream_list_sort.set_filter_out_inactives();
stream_list.update_streams_sidebar();
}
if (event.property === "web_animate_image_previews") {
// Rerender the whole message list UI

View File

@@ -542,6 +542,7 @@ export function initialize_everything(state_data) {
muted_users.initialize(state_data.muted_users);
stream_settings_ui.initialize();
left_sidebar_navigation_area.initialize();
stream_list_sort.initialize();
stream_list.initialize({
on_stream_click(stream_id, trigger) {
const sub = sub_store.get(stream_id);
@@ -558,7 +559,6 @@ export function initialize_everything(state_data) {
);
},
});
stream_list_sort.initialize();
condense.initialize();
spoilers.initialize();
lightbox.initialize();