show rooms

This commit is contained in:
Peter Maquiran
2024-06-05 10:28:38 +01:00
parent 39f89a92a5
commit 2e9492db68
10 changed files with 144 additions and 272 deletions
+12 -26
View File
@@ -35,6 +35,9 @@ import { ChatMessageDebuggingPage } from 'src/app/shared/popover/chat-message-de
import { PermissionService } from 'src/app/services/permission.service';
import { FileValidatorService } from "src/app/services/file/file-validator.service"
import { ChangeDetectorRef } from '@angular/core';
import { RoomRepositoryService } from 'src/app/services/Repositorys/chat/repository/room-repository.service';
import { Observable } from 'rxjs';
import { RoomListItemOutPutDTO, RoomListOutPutDTO } from 'src/app/services/Repositorys/chat/dto/room/roomListOutputDTO';
const IMAGE_DIR = 'stored-images';
@@ -103,6 +106,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
isAdmin = false;
roomCountDownDate: string;
textField = ''
roomData$: Observable<RoomListItemOutPutDTO | undefined>
constructor(
public popoverController: PopoverController,
@@ -124,39 +130,18 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private platform: Platform,
private fileOpener: FileOpener,
public p: PermissionService,
private FileValidatorService: FileValidatorService
private FileValidatorService: FileValidatorService,
private roomRepositoryService: RoomRepositoryService
) {
// update
this.checkAudioPermission()
}
ngOnChanges(changes: SimpleChanges): void {
this.ChatSystemService.getAllRooms();
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.openRoom(this.roomId)
this.ChatSystemService.getDmRoom(this.roomId)
this.showAvatar = false
setTimeout(() => {
this.scrollToBottomClicked()
this.showAvatar = true
}, 150)
this.deleteRecording()
// this.ChatSystemService.getDmRoom(this.roomId).deleteAll()
this.roomData$ = this.roomRepositoryService.getItemByIdLive(this.roomId)
}
sendTyping() {}
async ChatMessageDebuggingPage() {
@@ -415,7 +400,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
sendMessage() {
this.ChatSystemService.getDmRoom(this.roomId).send({})
}