fix chat bold

This commit is contained in:
Peter Maquiran
2024-09-02 12:33:43 +01:00
parent 18463e43e4
commit 1b9b4600ab
18 changed files with 162 additions and 81 deletions
@@ -3,6 +3,7 @@
<div class="main-header">
<div class="header-top">
<div class="middle" >
<ion-label class="title" *ngIf="(roomData$ | async) === null"> {{ room.roomName }}</ion-label>
<ion-label class="title" *ngIf="roomData$ | async as roomData"> {{ roomData.roomName }}</ion-label>
<!-- <button (click)="ChatMessageDebuggingPage()">Dev</button> -->
<span *ngIf="roomStatus$ | async as roomStatus"><ion-icon *ngIf="roomStatus" class="online" name="ellipse"></ion-icon></span>
@@ -22,9 +23,9 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
</div>
<ion-list class="header-bottom-contacts" *ngIf="roomMembers$ | async as memberList">
<ion-list class="header-bottom-contacts" *ngIf="roomMembers$ | async as memberList" >
<ng-container *ngFor="let user of memberList; let i = index">
{{ user.wxFullName }}<ng-container *ngIf="i < memberList.length - 1">, </ng-container>
<span *ngIf="roomType == RoomTypeEnum.Group"> {{ user.wxFullName }}<ng-container *ngIf="i < memberList.length - 1">, </ng-container> </span>
</ng-container>
</ion-list>
@@ -50,6 +50,7 @@ import { RoomTable } from 'src/app/infra/database/dexie/instance/chat/schema/roo
import { TypingTable } from 'src/app/infra/database/dexie/instance/chat/schema/typing';
import { HttpClient } from '@angular/common/http';
import { v4 as uuidv4 } from 'uuid'
import { RoomViewModel } from '../../store/model/room';
@Component({
selector: 'app-messages',
templateUrl: './messages.page.html',
@@ -69,6 +70,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
roomType!: RoomType
RoomTypeEnum = RoomType
@Input() room!: RoomViewModel
@Input() roomId: string;
@Input() showMessages: string;
@@ -112,7 +114,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
@ViewChild('array') myInputRef!: ElementRef;
userName = "";
room: any = new Array();
roomName: any;
isAdmin = true;
roomCountDownDate: string;
@@ -276,6 +277,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.chatServiceService.removeBoldFromRoom({roomId: this.roomId})
this.chatServiceService.getRoomById(this.roomId)
}
messageStatus(message: MessageEntity) {
@@ -423,7 +425,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottomClicked()
}, 100)
this.chatServiceService.removeBoldFromRoom({roomId: this.roomId})
setTimeout(() => {
this.chatServiceService.removeBoldFromRoom({roomId: this.roomId})
}, 1000)
});
}