logo: Compute realm-logo url in frontend only.

This commit fixes the bug of always showing
day-mode realm logo when color scheme display
setting is set to automatic but the OS setting
is dark theme. This is because we cannot check
the OS setting on backend and we need to set
the logo url accordingly in frontend only.
So, we remove the logo url computation from
backend completely and instead compute it in
the frontend only.

Fixes #18778.
This commit is contained in:
sahil839
2021-06-27 16:55:55 +05:30
committed by Tim Abbott
parent 9e1d98a512
commit c8849f8fe3
4 changed files with 5 additions and 91 deletions

View File

@@ -50,6 +50,7 @@ import * as people from "./people";
import * as pm_conversations from "./pm_conversations";
import * as popover_menus from "./popover_menus";
import * as presence from "./presence";
import * as realm_logo from "./realm_logo";
import * as realm_playground from "./realm_playground";
import * as recent_topics_util from "./recent_topics_util";
import * as reload from "./reload";
@@ -462,6 +463,7 @@ export function initialize_everything() {
const user_status_params = pop_fields("user_status");
const i18n_params = pop_fields("language_list");
realm_logo.rerender();
i18n.initialize(i18n_params);
tippyjs.initialize();
popover_menus.initialize();