Skip to content

Commit

Permalink
Fix statusbar bug when reboot app
Browse files Browse the repository at this point in the history
  • Loading branch information
snackwangpetter authored and stiartsly committed Sep 26, 2021
1 parent 8e4ecd2 commit 7ac2472
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { GlobalService } from 'src/app/services/global.service';
import { Config } from './services/config';
import { Logger, LogLevel } from './services/logger';
import { NFTContractControllerService } from 'src/app/services/nftcontract_controller.service';

import { IntentService } from './services/IntentService';
import { HttpService } from 'src/app/services/HttpService';

Expand Down Expand Up @@ -107,6 +106,8 @@ export class MyApp {
this.statusBar.backgroundColorByHexString('#f8f8ff');
this.statusBar.overlaysWebView(false);
}

this.theme.getSystemMode();
// Must do it in ios, otherwise the titlebar and status bar will overlap.

this.statusBar.show();
Expand Down
6 changes: 1 addition & 5 deletions src/app/services/theme.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Injectable } from '@angular/core';
import { Platform } from '@ionic/angular';
import { StatusBar } from '@ionic-native/status-bar/ngx';


Expand All @@ -12,11 +11,8 @@ import {
})
export class ThemeService {
public darkMode = true;
constructor(private platform: Platform,
constructor(
private statusBar: StatusBar) {
this.platform.ready().then(() => {
this.getTheme();
});
}

getTheme() {
Expand Down

0 comments on commit 7ac2472

Please sign in to comment.