mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-27 11:01:27 -04:00
Fix: Remove status bar black background in light theme
This commit is contained in:
@@ -8,8 +8,8 @@ android {
|
||||
applicationId "com.compassconnections.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 22
|
||||
versionName "1.1.10"
|
||||
versionCode 23
|
||||
versionName "1.1.11"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -67,11 +67,11 @@ export const updateStatusBar = async () => {
|
||||
if (isDark(theme)) {
|
||||
// Dark theme: light text on dark background
|
||||
await StatusBar.setStyle({style: Style.Dark});
|
||||
// await StatusBar.setBackgroundColor({color: '#000000'}); // or your dark bg color
|
||||
await StatusBar.setBackgroundColor({color: '#141414'}); // dark bg color (canvas-0)
|
||||
} else {
|
||||
// Light theme: dark text on light background
|
||||
await StatusBar.setStyle({style: Style.Light});
|
||||
// await StatusBar.setBackgroundColor({color: '#ffffff'}); // or your light bg color
|
||||
await StatusBar.setBackgroundColor({color: '#ffffff'}); // light bg color (canvas-0)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to update status bar:', error);
|
||||
|
||||
@@ -27,7 +27,6 @@ if (Capacitor.isNativePlatform()) {
|
||||
// Only runs on iOS/Android native
|
||||
// Note sure it's doing anything, though. Need to check
|
||||
StatusBar.setOverlaysWebView({overlay: false}).catch(console.warn)
|
||||
// StatusBar.setStyle({style: Style.Light}).catch(console.warn)
|
||||
|
||||
App.addListener('backButton', () => {
|
||||
window.dispatchEvent(new CustomEvent('appBackButton'))
|
||||
|
||||
Reference in New Issue
Block a user