mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix ios notifications
This commit is contained in:
+23
-25
@@ -164,8 +164,6 @@ export class HomePage implements OnInit {
|
||||
|
||||
this.logDeviceInfo();
|
||||
|
||||
this.notificationsService.onReciveForeground();
|
||||
this.notificationsService.onReciveBackground();
|
||||
|
||||
window.addEventListener('online', () => {
|
||||
this.backgroundservice.online()
|
||||
@@ -238,20 +236,20 @@ export class HomePage implements OnInit {
|
||||
}, 1000)
|
||||
|
||||
|
||||
/* if (!this.platform.is('desktop')) {
|
||||
App.addListener('appStateChange', ({ isActive }) => {
|
||||
if (isActive) {
|
||||
// The app is in the foreground.
|
||||
console.log('App is in the foreground');
|
||||
this.RochetChatConnectorService.connect()
|
||||
this.reloadComponent(true)
|
||||
} else {
|
||||
// The app is in the background.
|
||||
console.log('App is in the background');
|
||||
// You can perform actions specific to the background state here.
|
||||
}
|
||||
});
|
||||
} */
|
||||
/* if (!this.platform.is('desktop')) {
|
||||
App.addListener('appStateChange', ({ isActive }) => {
|
||||
if (isActive) {
|
||||
// The app is in the foreground.
|
||||
console.log('App is in the foreground');
|
||||
this.RochetChatConnectorService.connect()
|
||||
this.reloadComponent(true)
|
||||
} else {
|
||||
// The app is in the background.
|
||||
console.log('App is in the background');
|
||||
// You can perform actions specific to the background state here.
|
||||
}
|
||||
});
|
||||
} */
|
||||
|
||||
}
|
||||
|
||||
@@ -344,15 +342,15 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
reloadComponent(self:boolean,urlToNavigateTo ?:string){
|
||||
reloadComponent(self: boolean, urlToNavigateTo?: string) {
|
||||
//skipLocationChange:true means dont update the url to / when navigating
|
||||
console.log("Current route I am on:",this.router.url);
|
||||
const url=self ? this.router.url :urlToNavigateTo;
|
||||
this.router.navigateByUrl('/',{skipLocationChange:true}).then(()=>{
|
||||
this.router.navigate([`/${url}`]).then(()=>{
|
||||
console.log(`After navigation I am on:${this.router.url}`)
|
||||
})
|
||||
})
|
||||
}
|
||||
console.log("Current route I am on:", this.router.url);
|
||||
const url = self ? this.router.url : urlToNavigateTo;
|
||||
this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
|
||||
this.router.navigate([`/${url}`]).then(() => {
|
||||
console.log(`After navigation I am on:${this.router.url}`)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user