mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
update chat, make it render
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user