From b38a96996a10e4e43ff1b06ecd2235a0e3bdfa1c Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Fri, 16 Sep 2022 14:12:09 +0200 Subject: [PATCH] fix: set android status bar color correctly --- src/app/app.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c82c61e0..009a88b7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -87,6 +87,11 @@ export class AppComponent implements AfterContentInit { }); this.platform.ready().then(async () => { if (Capacitor.isNativePlatform()) { + await StatusBar.setBackgroundColor({ + color: getComputedStyle(document.documentElement) + .getPropertyValue('--ion-color-primary') + .trim(), + }); await StatusBar.setStyle({style: Style.Dark}); } await this.authNotificationsInit();