From 61a2e31175c0ef424bc57a9315168d61a38630bf Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 19 Jan 2026 20:14:35 +0100 Subject: [PATCH] Fix: Remove status bar black background in light theme --- android/app/build.gradle | 4 ++-- web/hooks/use-theme.ts | 4 ++-- web/pages/_app.tsx | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 6931e294..4a44a722 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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. diff --git a/web/hooks/use-theme.ts b/web/hooks/use-theme.ts index f772ee71..cc4a9d80 100644 --- a/web/hooks/use-theme.ts +++ b/web/hooks/use-theme.ts @@ -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); diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx index 6d7a841f..f91ed3f0 100644 --- a/web/pages/_app.tsx +++ b/web/pages/_app.tsx @@ -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'))