mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
remove console logs
This commit is contained in:
@@ -21,6 +21,10 @@ import { NetworkServiceService} from 'src/app/services/network-service.service';
|
||||
import { ViewedMessageService } from './viewed-message.service'
|
||||
import { NotificationsService } from '../notifications.service';
|
||||
import { Subscribe } from '../subcribe';
|
||||
import { Plugins } from '@capacitor/core';
|
||||
|
||||
const { App } = Plugins;
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -103,16 +107,37 @@ export class ChatSystemService {
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('resume', function () {
|
||||
if(SessionStore.user?.ChatData?.data) {
|
||||
this.restoreRooms();
|
||||
}
|
||||
|
||||
document.addEventListener('resume', () => {
|
||||
this.RochetChatConnectorService.setStatus('online')
|
||||
if(this._dm?.length == 0 && this._group?.length == 0) {
|
||||
this.getAllRooms();
|
||||
}
|
||||
});
|
||||
|
||||
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.restoreRooms();
|
||||
this.currentRoom?.loadHistory({forceUpdate: true})
|
||||
|
||||
setTimeout(() => {
|
||||
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.
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user