JSon bug on profile page fixed

This commit is contained in:
Eudes Inácio
2021-08-20 18:22:56 +01:00
parent 169f0ff3c2
commit c7812758cd
4 changed files with 40 additions and 5 deletions
+7 -2
View File
@@ -2,7 +2,7 @@
///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
import { Component, OnInit, NgZone } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
import { AnimationController, ModalController } from '@ionic/angular';
import { AnimationController, ModalController,Platform } from '@ionic/angular';
import { User } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { LocalstoreService } from 'src/app/store/localstore.service';
@@ -31,7 +31,8 @@ export class ProfilePage implements OnInit {
private jsonstore: JsonStore,
private storageservice: StorageService,
private zone: NgZone,
private notificationservice: NotificationsService
private notificationservice: NotificationsService,
private platform: Platform,
) {
this.loggeduser = authService.ValidatedUser;
@@ -42,7 +43,11 @@ export class ProfilePage implements OnInit {
}
ngOnInit() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
this.getNotificationData();
}
}