update chat, make it render

This commit is contained in:
Peter Maquiran
2024-03-07 12:02:59 +01:00
parent a614036b66
commit 84efe58c0a
10 changed files with 169 additions and 18 deletions
+13
View File
@@ -32,6 +32,8 @@ import { EventTrigger } from 'src/app/services/eventTrigger.service';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { RouteService } from 'src/app/services/route.service';
import { Plugins } from '@capacitor/core';
import { ChangeDetectorRef } from '@angular/core';
const { App } = Plugins;
@@ -128,6 +130,7 @@ export class ChatPage implements OnInit {
private RochetChatConnectorService: RochetChatConnectorService,
private zone: NgZone,
public RouteService: RouteService,
private ChangeDetectorRef: ChangeDetectorRef
) {
this.headers = new HttpHeaders();;
@@ -175,8 +178,18 @@ export class ChatPage implements OnInit {
}
});
this.ChatSystemService.setMainChangeDetector(()=> {
this.changeDetector()
})
}
changeDetector = () => {
console.log('run detection')
this.ChangeDetectorRef.detectChanges()
}
ngOnDestroy() {
// this.setStatus('offline');
this.routerSubscription?.unsubscribe();