diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index bfa57d03..caa016df 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -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( diff --git a/Mohem/src/app/authentication/login/login.component.html b/Mohem/src/app/authentication/login/login.component.html index 0237a655..0221f3ab 100644 --- a/Mohem/src/app/authentication/login/login.component.html +++ b/Mohem/src/app/authentication/login/login.component.html @@ -35,7 +35,7 @@ -
+