Use arrow functions

pull/21833/head
Steffen Kolmer 2020-10-19 12:57:57 +02:00
parent 6e97baf09f
commit 3358ed2792
1 changed files with 7 additions and 7 deletions

View File

@ -754,14 +754,14 @@ export default createReactClass({
} }
} }
}, },
onEventDecrypted(ev) { onEventDecrypted: (ev) => {
if (!SettingsStore.getValue('dontShowChatEffects')) { if (!SettingsStore.getValue('dontShowChatEffects')) {
if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || if (ev.isBeingDecrypted() || ev.isDecryptionFailure() ||
this.state.room.getUnreadNotificationCount() === 0) return; this.state.room.getUnreadNotificationCount() === 0) return;
this.handleConfetti(ev); this.handleConfetti(ev);
} }
}, },
handleConfetti(ev) { handleConfetti: (ev) => {
if (this.state.matrixClientIsReady) { if (this.state.matrixClientIsReady) {
const messageBody = _t('sends confetti'); const messageBody = _t('sends confetti');
if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) {