From 822850433e6a5b3a28742cc895d928d9d8f7f1d5 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Fri, 27 Apr 2018 17:27:32 -0400 Subject: [PATCH] Apply manual fixes for ESLint errors --- js/models/messages.js | 18 ++++++++++-------- js/views/attachment_view.js | 2 +- js/views/conversation_view.js | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/js/models/messages.js b/js/models/messages.js index 9b1d69a3a..22d418009 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -675,9 +675,9 @@ } if (readSync || message.isExpirationTimerUpdate()) { message.unset('unread'); - // This is primarily to allow the conversation to mark all older messages as - // read, as is done when we receive a read sync for a message we already - // know about. + // This is primarily to allow the conversation to mark all older + // messages as read, as is done when we receive a read sync for + // a message we already know about. Whisper.ReadSyncs.notifyConversation(message); } else { conversation.set( @@ -747,9 +747,10 @@ } catch (e) { return handleError(e); } - // We fetch() here because, between the message.save() above and the previous - // line's trigger() call, we might have marked all messages unread in the - // database. This message might already be read! + // We fetch() here because, between the message.save() above and + // the previous line's trigger() call, we might have marked all + // messages unread in the database. This message might already + // be read! const previousUnread = message.get('unread'); return message.fetch().then( () => { @@ -759,8 +760,9 @@ 'Caught race condition on new message read state! ' + 'Manually starting timers.' ); - // We call markRead() even though the message is already marked read - // because we need to start expiration timers, etc. + // We call markRead() even though the message is already + // marked read because we need to start expiration + // timers, etc. message.markRead(); } diff --git a/js/views/attachment_view.js b/js/views/attachment_view.js index 921df4df0..798039e7c 100644 --- a/js/views/attachment_view.js +++ b/js/views/attachment_view.js @@ -119,8 +119,8 @@ Signal.Backbone.Views.Lightbox.show(this.lightboxView.el); }, isVoiceMessage() { - // eslint-disable-next-line no-bitwise if ( + // eslint-disable-next-line no-bitwise this.model.flags & textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE ) { diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index a78e01b0f..0cea33394 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -513,6 +513,7 @@ const statusPromise = this.throttledGetProfiles(); // eslint-disable-next-line more/no-then this.statusFetch = statusPromise.then(() => + // eslint-disable-next-line more/no-then this.model.updateVerified().then(() => { this.onVerifiedChange(); this.statusFetch = null;