show selection of message to delete

This commit is contained in:
tiago.kayaya
2021-09-30 10:41:40 +01:00
parent ae8f7d31c4
commit 59bf694074
3 changed files with 76 additions and 50 deletions
+16 -6
View File
@@ -54,10 +54,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private backgrounds: string[] = ['rgba(0, 0, 255, 0.5)', 'rgba(0, 255, 0.5)', 'rgba(255, 0, 0, 0.5)', 'rgba(255, 255, 0, 0.5)', 'rgba(255, 0, 255, 0.5)', 'rgba(0, 255, 255, 0.5)'];
private currentColor: string = 'rgba(0, 0, 255, 0.5)';
private lastOnStart: number = 0;
private DOUBLE_CLICK_THRESHOLD: number = 500;
showMessageOptions = false;
private currentColor: string = 'rgba(0, 0, 255, 0.5)';
private lastOnStart: number = 0;
private DOUBLE_CLICK_THRESHOLD: number = 500;
showMessageOptions = false;
selectedMsgId:string;
constructor(
public popoverController: PopoverController,
@@ -130,7 +131,8 @@ showMessageOptions = false;
gesture.enable();
}
handlePress(){
handlePress(id?:string){
this.selectedMsgId = id;
this.showMessageOptions = true;
/* if(!this.showMessageOptions){
this.showMessageOptions = true;
@@ -142,6 +144,7 @@ showMessageOptions = false;
handleClick(){
this.showMessageOptions = false;
this.selectedMsgId = "";
}
private onStart() {
@@ -185,7 +188,14 @@ showMessageOptions = false;
"msgId": msgId,
"asUser": false,
}
this.alertService.confirmDeleteMessage(body);
if(msgId){
this.alertService.confirmDeleteMessage(body);
}
else{
this.toastService.badRequest('Não foi possível apagar');
}
this.showMessageOptions = false;
this.selectedMsgId = "";
}
setStatus(status:string){