fixed ios issues

master
Salman Afzal 6 years ago
parent 55ded3b340
commit 85b7e171bb

@ -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(

@ -35,7 +35,7 @@
</ion-col>
</ion-row>
</ion-grid>
<div *ngIf="!user" dir="ltr">
<div *ngIf="!user">
<ion-item class="item-input-login">
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">

Loading…
Cancel
Save