mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add delete message feature to groups view
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user