File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import { Capacitor } from '@capacitor/core';
66import { UISettingsStorage } from '../uiSettingsStorage' ;
77import { StatusBar , Style } from '@capacitor/status-bar' ;
88import { NavigationBar } from '@capgo/capacitor-navigation-bar' ;
9+ import { Keyboard , KeyboardStyle } from '@capacitor/keyboard' ;
10+
911@Injectable ( {
1012 providedIn : 'root' ,
1113} )
@@ -72,20 +74,27 @@ export class ThemeService {
7274
7375 private toggleDarkPalette ( shouldAdd : boolean ) {
7476 if ( Capacitor . getPlatform ( ) !== 'web' ) {
77+ const isIOS = Capacitor . getPlatform ( ) == 'ios' ;
7578 if ( shouldAdd ) {
7679 StatusBar . setStyle ( { style : Style . Dark } ) ;
7780 StatusBar . setBackgroundColor ( { color : '#121212' } ) ;
7881 NavigationBar . setNavigationBarColor ( {
7982 color : '#121212' ,
8083 darkButtons : false ,
8184 } ) ;
85+ if ( isIOS ) {
86+ Keyboard . setStyle ( { style : KeyboardStyle . Dark } ) ;
87+ }
8288 } else {
8389 StatusBar . setStyle ( { style : Style . Light } ) ;
8490 StatusBar . setBackgroundColor ( { color : '#F0F0F0' } ) ;
8591 NavigationBar . setNavigationBarColor ( {
8692 color : '#F0F0F0' ,
8793 darkButtons : true ,
8894 } ) ;
95+ if ( isIOS ) {
96+ Keyboard . setStyle ( { style : KeyboardStyle . Light } ) ;
97+ }
8998 }
9099 }
91100 this . _darkMode = shouldAdd ;
You can’t perform that action at this time.
0 commit comments