viewer rotation

This commit is contained in:
Peter Maquiran
2024-02-22 11:40:06 +01:00
parent d0806455c9
commit 7583bf5306
39 changed files with 711 additions and 1312 deletions
+25 -21
View File
@@ -121,31 +121,35 @@ export class ChatSystemService {
}
});
if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
// The app is in the foreground.
console.log('App is in the foreground');
try {
if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
// The app is in the foreground.
console.log('App is in the foreground');
if (SessionStore.user?.ChatData?.data) {
this.currentRoom?.loadHistory({ forceUpdate: true })
}
setTimeout(() => {
if (SessionStore.user?.ChatData?.data) {
this.subscribeToRoom()
this.RochetChatConnectorService.setStatus('online')
this.currentRoom?.loadHistory({ forceUpdate: true })
}
}, 1000);
/* 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.
}
});
}
setTimeout(() => {
if (SessionStore.user?.ChatData?.data) {
this.subscribeToRoom()
this.RochetChatConnectorService.setStatus('online')
}
}, 1000);
/* 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.
}
});
}
} catch(error) {}
}