mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
update chat, make it render
This commit is contained in:
@@ -30,7 +30,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
|
||||
import { ChangeDetectorRef } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
templateUrl: './group-messages.page.html',
|
||||
@@ -103,7 +103,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
private platform: Platform,
|
||||
private fileOpener: FileOpener,
|
||||
public p: PermissionService,
|
||||
private FileValidatorService: FileValidatorService
|
||||
private FileValidatorService: FileValidatorService,
|
||||
private ChangeDetectorRef: ChangeDetectorRef
|
||||
) {
|
||||
|
||||
this.ChatSystemService.getUser()
|
||||
@@ -119,7 +120,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.ChatSystemService.openRoom(this.roomId)
|
||||
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
||||
|
||||
this.ChatSystemService.getGroupRoom(this.roomId).setChangeDetector(()=> {
|
||||
this.changeDetector()
|
||||
})
|
||||
this.showAvatar = false
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -131,6 +134,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
}
|
||||
|
||||
changeDetector = () => {
|
||||
console.log('run detection shared')
|
||||
this.ChangeDetectorRef.detectChanges()
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.loggedUser = this.loggedUserChat;
|
||||
//setTimeout(() => {
|
||||
|
||||
@@ -34,6 +34,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { ChatMessageDebuggingPage } from 'src/app/shared/popover/chat-message-debugging/chat-message-debugging.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
import { ChangeDetectorRef } from '@angular/core';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -123,7 +124,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private platform: Platform,
|
||||
private fileOpener: FileOpener,
|
||||
public p: PermissionService,
|
||||
private FileValidatorService: FileValidatorService
|
||||
private FileValidatorService: FileValidatorService,
|
||||
private ChangeDetectorRef: ChangeDetectorRef
|
||||
) {
|
||||
// update
|
||||
this.checkAudioPermission()
|
||||
@@ -138,6 +140,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
this.ChatSystemService.openRoom(this.roomId)
|
||||
|
||||
this.ChatSystemService.getDmRoom(this.roomId)
|
||||
this.ChatSystemService.getDmRoom(this.roomId).setChangeDetector(()=> {
|
||||
this.changeDetector()
|
||||
})
|
||||
|
||||
this.showAvatar = false
|
||||
|
||||
|
||||
@@ -154,6 +161,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
}
|
||||
|
||||
changeDetector = () => {
|
||||
console.log('run detection shared')
|
||||
this.ChangeDetectorRef.detectChanges()
|
||||
}
|
||||
|
||||
|
||||
async ChatMessageDebuggingPage() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
|
||||
Reference in New Issue
Block a user