From cabd0106f38323924dff680d45fb483b04558f58 Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 8 Jun 2023 16:15:14 +0530 Subject: [PATCH] starred_messages_ui: Add initialize method for this module. We need to call `rerender_ui` once on the initial page load, hence we need to initialize `starred_message` module and call `rerender_ui` together. Fixes #25935. --- web/src/starred_messages_ui.js | 5 +++++ web/src/ui_init.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/starred_messages_ui.js b/web/src/starred_messages_ui.js index 77ced4e828..176c5fb5b8 100644 --- a/web/src/starred_messages_ui.js +++ b/web/src/starred_messages_ui.js @@ -99,3 +99,8 @@ export function confirm_unstar_all_messages_in_topic(stream_id, topic) { on_click, }); } + +export function initialize() { + starred_messages.initialize(); + rerender_ui(); +} diff --git a/web/src/ui_init.js b/web/src/ui_init.js index f400cbf3d6..f6d58ad2c6 100644 --- a/web/src/ui_init.js +++ b/web/src/ui_init.js @@ -91,7 +91,7 @@ import * as settings_realm_user_settings_defaults from "./settings_realm_user_se import * as settings_sections from "./settings_sections"; import * as settings_toggle from "./settings_toggle"; import * as spoilers from "./spoilers"; -import * as starred_messages from "./starred_messages"; +import * as starred_messages_ui from "./starred_messages_ui"; import * as stream_data from "./stream_data"; import * as stream_edit from "./stream_edit"; import * as stream_edit_subscribers from "./stream_edit_subscribers"; @@ -725,7 +725,7 @@ export function initialize_everything() { sent_messages.initialize(); hotspots.initialize(); typing.initialize(); - starred_messages.initialize(); + starred_messages_ui.initialize(); user_status_ui.initialize(); fenced_code.initialize(generated_pygments_data); message_edit_history.initialize();