mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix chat bold
This commit is contained in:
@@ -13,16 +13,13 @@ import { TimeService } from 'src/app/services/functions/time.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
// import { RoomRemoteDataSourceState } from 'src/app/module/chat/data/repository/room-memory-data-source';
|
||||
|
||||
import { Observable as DexieObservable } from 'Dexie';
|
||||
import { EditGroupPage } from './modal/edit-group/edit-group.page';
|
||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service'
|
||||
import { RoomLocalRepository } from 'src/app/module/chat/data/repository/room/room-local-repository.service'
|
||||
import { map, switchMap, tap } from 'rxjs/operators';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
import { BehaviorSubject, interval, Subscription } from 'rxjs';
|
||||
import { RoomTable } from 'src/app/infra/database/dexie/instance/chat/schema/room';
|
||||
import { RoomEntity, RoomType } from 'src/app/core/chat/entity/group';
|
||||
import { RoomType } from 'src/app/core/chat/entity/group';
|
||||
import { BoldLocalRepository } from 'src/app/module/chat/data/repository/bold/bold-local-repository'
|
||||
import { BoldTable } from 'src/app/infra/database/dexie/instance/chat/schema/bold';
|
||||
import { RoomViewModel } from './store/model/room';
|
||||
@@ -122,9 +119,9 @@ export class ChatPage implements OnInit {
|
||||
new Date(b.messages?.[0]?.sentAt as string).getTime() -
|
||||
new Date(a.messages?.[0]?.sentAt as string).getTime()
|
||||
);
|
||||
this.RoomSelected = this.rooms.filter(e => e.id == this.idSelected)[0]
|
||||
|
||||
|
||||
// this.RoomSelected = this.rooms.filter(e => e.id == this.idSelected)[0]
|
||||
}
|
||||
ngOnInit() {
|
||||
// this.subscription = this.roomListSubject.pipe(
|
||||
|
||||
@@ -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)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user