mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
show selection of message to delete
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user