need to change branch

This commit is contained in:
Peter Maquiran
2022-03-15 15:49:59 +01:00
parent 616566bf77
commit 00cf4f7eaa
10 changed files with 138 additions and 37 deletions
@@ -45,15 +45,18 @@
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
</fa-icon>
<mat-menu #beforeMenu="matMenu" xPosition="before">
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
<button (click)="deleteMessage(msg._id, msg)" class="menuButton">Apagar mensagem</button>
</mat-menu>
</div>
<div class="title">
<ion-label>{{msg.u.name}} </ion-label>
<ion-label>{{msg.u.name}}</ion-label>
<span class="time">{{msg.duration}}</span>
</div>
<div class="d-flex justify-space-between">
<ion-label class="flex-0">{{msg.msg}} </ion-label>
<ion-label *ngIf="msg.delate == false" class="flex-0">{{msg.msg}}</ion-label>
<ion-label *ngIf="msg.delate == true" class="flex-0">Apagou a mensagem</ion-label>
<ion-label class="float-status-all float-status" >
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
@@ -72,7 +75,7 @@
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
</fa-icon>
<mat-menu #beforeMenu="matMenu" xPosition="before">
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
<button (click)="deleteMessage(msg._id, msg)" class="menuButton">Apagar mensagem</button>
</mat-menu>
</div>
<div class="title">
+10 -3
View File
@@ -249,9 +249,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
}
deleteMessage(msgId: string) {
const room = this.wsChatMethodsService.getDmRoom(this.roomId)
this.alertService.confirmDeleteMessage(msgId, room);
deleteMessage(msgId: string, msg:MessageService) {
msg.deleteFromDB()
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
}
async viewDocument(msg: any, url?: string) {
@@ -759,9 +761,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
ts: msg.attachments[0].ts
}
msg.save()
// msg.attachments[0].image_url = 'sdfsdf'
await this.storage.set(msg.file.guid, this.downloadFile).then(() => {
console.log('IMAGE SAVED')
});
}
});