mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
update chat, make it render
This commit is contained in:
@@ -35,7 +35,6 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
import { sanitize } from "sanitize-filename-ts";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
templateUrl: './group-messages.page.html',
|
||||
@@ -108,7 +107,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private file: File,
|
||||
private fileOpener: FileOpener,
|
||||
public RouteService: RouteService,
|
||||
private FileValidatorService: FileValidatorService
|
||||
private FileValidatorService: FileValidatorService,
|
||||
private ChangeDetectorRef: ChangeDetectorRef
|
||||
) {
|
||||
this.ChatSystemService.getUser()
|
||||
|
||||
@@ -137,6 +137,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
open() {
|
||||
try {
|
||||
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
||||
@@ -144,6 +146,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.ChatSystemService.openRoom(this.roomId)
|
||||
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
||||
|
||||
this.ChatSystemService.getGroupRoom(this.roomId).setChangeDetector(()=> {
|
||||
this.changeDetector()
|
||||
})
|
||||
} catch (error) {
|
||||
setTimeout(() => {
|
||||
this.open()
|
||||
@@ -151,6 +156,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
changeDetector = () => {
|
||||
console.log('run detection page')
|
||||
this.ChangeDetectorRef.detectChanges()
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.loggedUser = this.loggedUserChat;
|
||||
|
||||
Reference in New Issue
Block a user