pull amde

This commit is contained in:
Equilibrium ITO
2024-03-11 11:24:01 +01:00
40 changed files with 449 additions and 324 deletions
@@ -36,7 +36,6 @@ import { FileValidatorService } from "src/app/services/file/file-validator.servi
import { sanitize } from "sanitize-filename-ts";
import { FilePicker } from '@capawesome/capacitor-file-picker';
@Component({
selector: 'app-group-messages',
templateUrl: './group-messages.page.html',
@@ -109,7 +108,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()
@@ -138,6 +138,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
open() {
try {
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
@@ -145,6 +147,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()
@@ -152,6 +157,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
}
changeDetector = () => {
console.log('run detection page')
this.ChangeDetectorRef.detectChanges()
}
ngOnInit() {
this.loggedUser = this.loggedUserChat;