@@ -20,7 +20,7 @@ import { CoreDB } from '@services/db';
20
20
import { CoreEvents , CoreEventsProvider } from '@services/events' ;
21
21
import { CoreUtils , PromiseDefer } from '@services/utils/utils' ;
22
22
import { SQLiteDB , SQLiteDBTableSchema } from '@classes/sqlitedb' ;
23
- import CoreConfigConstants from '@app/config.json ' ;
23
+ import { CoreConstants } from '@core/constants ' ;
24
24
25
25
import { makeSingleton , Keyboard , Network , StatusBar , Platform } from '@singletons/core.singletons' ;
26
26
import { CoreLogger } from '@singletons/logger' ;
@@ -645,21 +645,21 @@ export class CoreAppProvider {
645
645
* Set StatusBar color depending on platform.
646
646
*/
647
647
setStatusBarColor ( ) : void {
648
- if ( typeof CoreConfigConstants . statusbarbgios == 'string' && this . isIOS ( ) ) {
648
+ if ( typeof CoreConstants . CONFIG . statusbarbgios == 'string' && this . isIOS ( ) ) {
649
649
// IOS Status bar properties.
650
650
StatusBar . instance . overlaysWebView ( false ) ;
651
- StatusBar . instance . backgroundColorByHexString ( CoreConfigConstants . statusbarbgios ) ;
652
- CoreConfigConstants . statusbarlighttextios ? StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
653
- } else if ( typeof CoreConfigConstants . statusbarbgandroid == 'string' && this . isAndroid ( ) ) {
651
+ StatusBar . instance . backgroundColorByHexString ( CoreConstants . CONFIG . statusbarbgios ) ;
652
+ CoreConstants . CONFIG . statusbarlighttextios ? StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
653
+ } else if ( typeof CoreConstants . CONFIG . statusbarbgandroid == 'string' && this . isAndroid ( ) ) {
654
654
// Android Status bar properties.
655
- StatusBar . instance . backgroundColorByHexString ( CoreConfigConstants . statusbarbgandroid ) ;
656
- CoreConfigConstants . statusbarlighttextandroid ?
655
+ StatusBar . instance . backgroundColorByHexString ( CoreConstants . CONFIG . statusbarbgandroid ) ;
656
+ CoreConstants . CONFIG . statusbarlighttextandroid ?
657
657
StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
658
- } else if ( typeof CoreConfigConstants . statusbarbg == 'string' ) {
658
+ } else if ( typeof CoreConstants . CONFIG . statusbarbg == 'string' ) {
659
659
// Generic Status bar properties.
660
660
this . isIOS ( ) && StatusBar . instance . overlaysWebView ( false ) ;
661
- StatusBar . instance . backgroundColorByHexString ( CoreConfigConstants . statusbarbg ) ;
662
- CoreConfigConstants . statusbarlighttext ? StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
661
+ StatusBar . instance . backgroundColorByHexString ( CoreConstants . CONFIG . statusbarbg ) ;
662
+ CoreConstants . CONFIG . statusbarlighttext ? StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
663
663
} else {
664
664
// Default Status bar properties.
665
665
this . isAndroid ( ) ? StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
@@ -670,14 +670,14 @@ export class CoreAppProvider {
670
670
* Reset StatusBar color if any was set.
671
671
*/
672
672
resetStatusBarColor ( ) : void {
673
- if ( typeof CoreConfigConstants . statusbarbgremotetheme == 'string' &&
674
- ( ( typeof CoreConfigConstants . statusbarbgios == 'string' && this . isIOS ( ) ) ||
675
- ( typeof CoreConfigConstants . statusbarbgandroid == 'string' && this . isAndroid ( ) ) ||
676
- typeof CoreConfigConstants . statusbarbg == 'string' ) ) {
673
+ if ( typeof CoreConstants . CONFIG . statusbarbgremotetheme == 'string' &&
674
+ ( ( typeof CoreConstants . CONFIG . statusbarbgios == 'string' && this . isIOS ( ) ) ||
675
+ ( typeof CoreConstants . CONFIG . statusbarbgandroid == 'string' && this . isAndroid ( ) ) ||
676
+ typeof CoreConstants . CONFIG . statusbarbg == 'string' ) ) {
677
677
// If the status bar has been overriden and there's a fallback color for remote themes, use it now.
678
678
this . isIOS ( ) && StatusBar . instance . overlaysWebView ( false ) ;
679
- StatusBar . instance . backgroundColorByHexString ( CoreConfigConstants . statusbarbgremotetheme ) ;
680
- CoreConfigConstants . statusbarlighttextremotetheme ?
679
+ StatusBar . instance . backgroundColorByHexString ( CoreConstants . CONFIG . statusbarbgremotetheme ) ;
680
+ CoreConstants . CONFIG . statusbarlighttextremotetheme ?
681
681
StatusBar . instance . styleLightContent ( ) : StatusBar . instance . styleDefault ( ) ;
682
682
}
683
683
}
0 commit comments