Cached constants for readability

pull/652/head
Vince 6 years ago
parent a7a2f9289c
commit 0643c6836c

@ -614,6 +614,8 @@
// for the public group chat // for the public group chat
const conversation = this.getConversation(); const conversation = this.getConversation();
const isModerator = conversation && !!conversation.isModerator(this.OUR_NUMBER);
const convoId = conversation ? conversation.id : undefined; const convoId = conversation ? conversation.id : undefined;
const isGroup = !!conversation && !conversation.isPrivate(); const isGroup = !!conversation && !conversation.isPrivate();
@ -654,10 +656,9 @@
conversation.isModerator(phoneNumber), conversation.isModerator(phoneNumber),
isDeletable: isDeletable:
!this.get('isPublic') || !this.get('isPublic') ||
conversation && conversation.isModerator(this.OUR_NUMBER) || isModerator ||
this.getSource() === this.OUR_NUMBER, phoneNumber === this.OUR_NUMBER,
isModerator: isModerator: isModerator
conversation && !!conversation.isModerator(this.OUR_NUMBER),
onCopyText: () => this.copyText(), onCopyText: () => this.copyText(),
onSelectMessage: () => this.selectMessage(), onSelectMessage: () => this.selectMessage(),

Loading…
Cancel
Save