mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
viewer rotation
This commit is contained in:
@@ -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) {}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user