mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
reorganizde file path
This commit is contained in:
@@ -126,12 +126,6 @@
|
||||
</div>
|
||||
<div style="text-align: end;">
|
||||
|
||||
<!-- <div *ngIf="messageStatus(message) == 'enviar'" style="font-size: .6875rem;">A enviar</div>
|
||||
<div *ngIf="messageStatus(message) == 'enviado'" style="font-size: .6875rem;">Enviado</div>
|
||||
<div *ngIf="messageStatus(message) == 'allReceived'" style="font-size: .6875rem;">allReceived</div>
|
||||
<div *ngIf="messageStatus(message) == 'allViewed'" style="font-size: .6875rem;">allViewed</div>
|
||||
-->
|
||||
|
||||
<div *ngIf="totalMembers != 0">
|
||||
<ion-icon *ngIf="messageStatus(message) == 'enviar'" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="messageStatus(message) == 'enviado'" src="assets/images/check-solid.svg"></ion-icon>
|
||||
|
||||
@@ -23,7 +23,7 @@ import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { Observable as DexieObservable } from 'Dexie';
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { RoomLocalRepository } from 'src/app/module/chat/data/repository/room/room-local-repository.service'
|
||||
import { MemberListLocalRepository } from 'src/app/module/chat/data/repository/member-list-local-repository.service'
|
||||
import { MemberListLocalRepository } from 'src/app/module/chat/data/repository/member/member-list-local-repository.service'
|
||||
import { MessageTable } from 'src/app/module/chat/infra/database/dexie/schema/message';
|
||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service';
|
||||
import { EditMessagePage } from 'src/app/modals/edit-message/edit-message.page';
|
||||
@@ -340,6 +340,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
listenToIncomingMessage() {
|
||||
this.messageReceiveSubject?.unsubscribe();
|
||||
this.messageReceiveSubject = this.chatServiceService.listenToIncomingMessage(this.roomId).subscribe(async (message) => {
|
||||
|
||||
this.messages1[this.roomId].push(message as MessageEntity)
|
||||
|
||||
if(message.hasAttachment) {
|
||||
@@ -367,14 +368,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
console.log('delete class', deleteMessage);
|
||||
|
||||
const index = this.messages1[this.roomId].findIndex(e => e?.id === deleteMessage.id); // Use triple equals for comparison
|
||||
|
||||
if (index !== -1) { // Check if the item was found
|
||||
console.log('delete ==')
|
||||
this.messages1[this.roomId].splice(index, 1);
|
||||
// console.log('removed index', index);
|
||||
} else {
|
||||
// console.log('message not found');
|
||||
}
|
||||
this.messages1[this.roomId][index].isDeleted = true
|
||||
// if (index !== -1) { // Check if the item was found
|
||||
// console.log('delete ==')
|
||||
// this.messages1[this.roomId].splice(index, 1);
|
||||
// // console.log('removed index', index);
|
||||
// } else {
|
||||
// // console.log('message not found');
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -401,6 +402,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
this.messageSendSubject = this.chatServiceService.listenToSendMessage(this.roomId).subscribe((updateMessage) => {
|
||||
|
||||
console.log({updateMessage},'=--=-=-=--=', this.messages1[this.roomId])
|
||||
const index = this.messages1[this.roomId].findIndex(e => e?.requestId === updateMessage.requestId); // Use triple equals for comparison
|
||||
|
||||
if (index !== -1) { // Check if the item was found
|
||||
@@ -417,7 +419,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
} else {
|
||||
// console.log('message not found');
|
||||
console.log('not found message to update ui');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user