user status: Fix custom emoji not loading during page load.

The reason for this was we were not loading extra
parameters while storing the status emoji object.

For this we also need the emoji module to be initialized
early because the right sidebar would need it to display
the status emoji.
This commit is contained in:
Riken Shah
2021-08-02 12:00:09 +00:00
committed by Tim Abbott
parent a6bef51541
commit 8210daefc8
2 changed files with 8 additions and 4 deletions

View File

@@ -515,6 +515,13 @@ export function initialize_everything() {
settings_data.initialize(date_joined);
// The emoji module must be initialized before the right sidebar
// module, so that we can display custom emoji in statuses.
emoji.initialize({
realm_emoji: emoji_params.realm_emoji,
emoji_codes: generated_emoji_codes,
});
// These components must be initialized early, because other
// modules' initialization has not been audited for whether they
// expect DOM elements to always exist (As that did before these
@@ -561,10 +568,6 @@ export function initialize_everything() {
bot_data.initialize(bot_params); // Must happen after people.initialize()
message_fetch.initialize(server_events.home_view_loaded);
message_scroll.initialize();
emoji.initialize({
realm_emoji: emoji_params.realm_emoji,
emoji_codes: generated_emoji_codes,
});
markdown.initialize(markdown_config.get_helpers());
linkifiers.initialize(page_params.realm_linkifiers);
realm_playground.initialize(page_params.realm_playgrounds, generated_pygments_data);