<commit_before>import { Component } from '@angular/core';
import { Platform, Events } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
// import { JPushService } from '@providers/utils/jpush.service'; // 暂未启用
import { GlobalService } from '@providers/global.service';
import { UpdateService } from '@providers/utils/update.service';
import { NativeService } from '@providers/utils/native.service';
import { RebirthHttpProvider } from 'rebirth-http';
import { BackgroundMode } from '@ionic-native/background-mode';

@Component({
  templateUrl: 'app.html',
})
export class MyAppComponent {
  rootPage: any;
  hideNav = false;

  constructor(
    platform: Platform,
    statusBar: StatusBar,
    splashScreen: SplashScreen,
    // jPushService: JPushService,
    updateService: UpdateService,
    public rebirthProvider: RebirthHttpProvider,
    private backgroundMode: BackgroundMode,
    global: GlobalService,
    native: NativeService,
    private events: Events
  ) {
    platform.ready().then(() => {
      statusBar.styleBlackOpaque();
      splashScreen.hide();
      // 检查更新
      updateService.checkUpdate();
      native.initNativeService();
      // 开启后台运行
      // backgroundMode.enable();
      // 初始化 jPush
      // if (global.userinfo){
      //   jPushService.init(global.userinfo.username);
      // }
    });

    // Check if the user has already seen the tutorial
    if (global.isFirstTimeOpen) {
      global.isFirstTimeOpen = false;
      this.rootPage = 'GuidePage';
    } else {
      if (global.userinfo) {
        this.rebirthProvider.headers({ Authorization: global.token }, true);
        this.rebirthProvider.addResponseErrorInterceptor(err => {
          console.error('请求错误！', err);
        });
        this.rootPage = 'TabsPage';
      } else {
        this.rootPage = 'LoginPage';
      }
    }

    events.subscribe('qrScanner:show', () => {
      this.hideNav = true;
    });
    events.subscribe('qrScanner:hide', () => {
      this.hideNav = false;
    });
  }
}
<commit_msg>fix: ios status bar text color<commit_after>import { Component } from '@angular/core';
import { Platform, Events } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
// import { JPushService } from '@providers/utils/jpush.service'; // 暂未启用
import { GlobalService } from '@providers/global.service';
import { UpdateService } from '@providers/utils/update.service';
import { NativeService } from '@providers/utils/native.service';
import { RebirthHttpProvider } from 'rebirth-http';
import { BackgroundMode } from '@ionic-native/background-mode';

@Component({
  templateUrl: 'app.html',
})
export class MyAppComponent {
  rootPage: any;
  hideNav = false;

  constructor(
    platform: Platform,
    statusBar: StatusBar,
    splashScreen: SplashScreen,
    // jPushService: JPushService,
    updateService: UpdateService,
    public rebirthProvider: RebirthHttpProvider,
    private backgroundMode: BackgroundMode,
    global: GlobalService,
    native: NativeService,
    private events: Events
  ) {
    platform.ready().then(() => {
      statusBar.overlaysWebView(false);
      statusBar.styleDefault();
      statusBar.backgroundColorByHexString('#f8f8f8');
      // 检查更新
      updateService.checkUpdate();
      native.initNativeService();
      // 开启后台运行
      // backgroundMode.enable();
      // 初始化 jPush
      // if (global.userinfo){
      //   jPushService.init(global.userinfo.username);
      // }
    });

    // Check if the user has already seen the tutorial
    if (global.isFirstTimeOpen) {
      global.isFirstTimeOpen = false;
      this.rootPage = 'GuidePage';
    } else {
      if (global.userinfo) {
        this.rebirthProvider.headers({ Authorization: global.token }, true);
        this.rebirthProvider.addResponseErrorInterceptor(err => {
          console.error('请求错误！', err);
        });
        this.rootPage = 'TabsPage';
      } else {
        this.rootPage = 'LoginPage';
      }
    }

    events.subscribe('qrScanner:show', () => {
      this.hideNav = true;
    });
    events.subscribe('qrScanner:hide', () => {
      this.hideNav = false;
    });
  }
}

{'fraction_non_alphanumeric': 0.1342062193126023, 'fraction_numerical': 0.0007014262333411269, 'mean_word_length': 3.0434782608695654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2232657', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1293, 'n_words': 256}