|
|
|
|
@ -40,6 +40,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|
|
|
|
user: boolean;
|
|
|
|
|
deviceToken: string;
|
|
|
|
|
TeamFlag: string = 'false';
|
|
|
|
|
isIOS = false;
|
|
|
|
|
constructor(
|
|
|
|
|
public ts: TranslatorService,
|
|
|
|
|
private cs: CommonService,
|
|
|
|
|
@ -72,9 +73,13 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|
|
|
|
this.lazyLoadingService.monitorLazyLoading(15, true);
|
|
|
|
|
this.platform.ready().then(() => {
|
|
|
|
|
this.ts.loadResources(() => {
|
|
|
|
|
this.isIOS = this.platform.is('ios') ? true : false;
|
|
|
|
|
this.initializeDirection();
|
|
|
|
|
// this.statusBar.styleDefault();
|
|
|
|
|
this.start = true;
|
|
|
|
|
if (this.isIOS) {
|
|
|
|
|
this.monitUrlChange();
|
|
|
|
|
}
|
|
|
|
|
this.watchLanguageChangeEvents();
|
|
|
|
|
this.subscribeEvents();
|
|
|
|
|
this.keyboardService.watchKeyboard();
|
|
|
|
|
@ -83,6 +88,17 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private monitUrlChange() {
|
|
|
|
|
this.router.events.subscribe((val) => {
|
|
|
|
|
if (this.router.isActive('/authentication/login', true)) {
|
|
|
|
|
this.direction = 'ltr';
|
|
|
|
|
} else {
|
|
|
|
|
this.direction = TranslatorService.getCurrentDirection();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private startReceivingPushService() {
|
|
|
|
|
console.log('platform.ready');
|
|
|
|
|
this.pushService.startReceiving();
|
|
|
|
|
@ -137,7 +153,16 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|
|
|
|
console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
|
|
|
|
|
}
|
|
|
|
|
private initializeDirection() {
|
|
|
|
|
this.direction = TranslatorService.getCurrentDirection();
|
|
|
|
|
if (this.isIOS) {
|
|
|
|
|
if (this.router.isActive('/authentication/login', true)) {
|
|
|
|
|
this.direction = 'ltr';
|
|
|
|
|
} else {
|
|
|
|
|
this.direction = TranslatorService.getCurrentDirection();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.direction = TranslatorService.getCurrentDirection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private watchUserLoginChangeEvents() {
|
|
|
|
|
this.events.subscribe(
|
|
|
|
|
|