realm_logo: Refactor build_realm_logo_widget function.

As a follow up of commit (bf1c9420df), this
commit removes the `build_realm_day_mode_logo_widget` and
`build_realm_night_mode_logo_widget` function , and changes
`build_realm_logo_widget` to take single argument `is_night` and depending
on this argument, corresponding `day mode` or `night_mode` widget is
handled.
This commit is contained in:
Pragati Agrawal
2019-03-11 21:18:59 +05:30
committed by Tim Abbott
parent 32853a565f
commit 2ccf5655da
3 changed files with 23 additions and 37 deletions

View File

@@ -1087,8 +1087,9 @@ exports.build_page = function () {
});
}
realm_logo.build_realm_day_mode_logo_widget(upload_realm_logo);
realm_logo.build_realm_night_mode_logo_widget(upload_realm_logo);
realm_logo.build_realm_logo_widget(upload_realm_logo, false);
realm_logo.build_realm_logo_widget(upload_realm_logo, true);
$('#deactivate_realm_button').on('click', function (e) {
if (!overlays.is_modal_open()) {