MOBILE-3670 styles: Apply statusbar color on login and dark mode

main
Pau Ferrer Ocaña 2021-06-04 16:54:22 +02:00
parent 9f0de18eaa
commit 79d5db6a88
2 changed files with 6 additions and 0 deletions

View File

@ -392,6 +392,8 @@ export class AddonRemoteThemesProvider {
this.initSiteStyleElement(TMP_SITE_ID, false); this.initSiteStyleElement(TMP_SITE_ID, false);
this.stylesEls[TMP_SITE_ID].element.innerHTML = text; this.stylesEls[TMP_SITE_ID].element.innerHTML = text;
CoreApp.setStatusBarColor();
} }
/** /**
@ -440,6 +442,8 @@ export class AddonRemoteThemesProvider {
if (siteId && this.stylesEls[siteId]) { if (siteId && this.stylesEls[siteId]) {
document.head.removeChild(this.stylesEls[siteId].element); document.head.removeChild(this.stylesEls[siteId].element);
delete this.stylesEls[siteId]; delete this.stylesEls[siteId];
CoreApp.setStatusBarColor();
} }
} }

View File

@ -473,6 +473,8 @@ export class CoreSettingsHelperProvider {
*/ */
protected toggleDarkMode(enable: boolean = false): void { protected toggleDarkMode(enable: boolean = false): void {
document.body.classList.toggle('dark', enable); document.body.classList.toggle('dark', enable);
CoreApp.setStatusBarColor();
} }
} }