add delete message feature to groups view

This commit is contained in:
tiago.kayaya
2021-09-30 12:23:22 +01:00
parent bc961c3ce1
commit 7e05f9570a
4 changed files with 96 additions and 36 deletions
@@ -51,12 +51,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
scrollToBottomBtn = false;
attendees: EventPerson[] = [];
longPressActive = false;
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;
selectedMsgId:string;
@@ -147,25 +141,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.selectedMsgId = "";
}
private onStart() {
alert('OP');
const now = Date.now();
if (Math.abs(now - this.lastOnStart) <= this.DOUBLE_CLICK_THRESHOLD) {
this.rectangle.nativeElement.style.setProperty('background', this.getRandomBackground());
this.lastOnStart = 0;
} else {
this.lastOnStart = now;
}
}
private getRandomBackground() {
const options = this.backgrounds.filter(bg => bg !== this.currentColor);
this.currentColor = options[Math.floor(Math.random() * options.length)];
return this.currentColor;
}
/* onPressingMessage(){
const gesture = this.gestureController.create({
el: this.messageContainer.nativeElement,