refactor: auto-detect if theme is a dark theme and apply correct status bar colors

This commit is contained in:
Aman Harwara
2023-08-15 15:40:49 +05:30
parent 600b690249
commit 2936ef174c
2 changed files with 6 additions and 5 deletions

View File

@@ -337,10 +337,11 @@ export class ThemeManager extends AbstractUIService {
link.onload = () => {
this.syncThemeColorMetadata()
if (this.application.isNativeMobileWeb() && !theme.layerable) {
const packageInfo = theme.featureDescription
if (this.application.isNativeMobileWeb()) {
setTimeout(() => {
this.application.mobileDevice.handleThemeSchemeChange(packageInfo.isDark ?? false, this.getBackgroundColor())
const backgroundColorString = this.getBackgroundColor()
const backgroundColor = new Color(backgroundColorString)
this.application.mobileDevice.handleThemeSchemeChange(backgroundColor.isDark(), backgroundColorString)
})
}