Apply manual fixes for ESLint errors

This commit is contained in:
Daniel Gasienica 2018-04-27 17:27:32 -04:00
parent 1dd87ad197
commit 822850433e
3 changed files with 12 additions and 9 deletions

View file

@ -675,9 +675,9 @@
} }
if (readSync || message.isExpirationTimerUpdate()) { if (readSync || message.isExpirationTimerUpdate()) {
message.unset('unread'); message.unset('unread');
// This is primarily to allow the conversation to mark all older messages as // This is primarily to allow the conversation to mark all older
// read, as is done when we receive a read sync for a message we already // messages as read, as is done when we receive a read sync for
// know about. // a message we already know about.
Whisper.ReadSyncs.notifyConversation(message); Whisper.ReadSyncs.notifyConversation(message);
} else { } else {
conversation.set( conversation.set(
@ -747,9 +747,10 @@
} catch (e) { } catch (e) {
return handleError(e); return handleError(e);
} }
// We fetch() here because, between the message.save() above and the previous // We fetch() here because, between the message.save() above and
// line's trigger() call, we might have marked all messages unread in the // the previous line's trigger() call, we might have marked all
// database. This message might already be read! // messages unread in the database. This message might already
// be read!
const previousUnread = message.get('unread'); const previousUnread = message.get('unread');
return message.fetch().then( return message.fetch().then(
() => { () => {
@ -759,8 +760,9 @@
'Caught race condition on new message read state! ' + 'Caught race condition on new message read state! ' +
'Manually starting timers.' 'Manually starting timers.'
); );
// We call markRead() even though the message is already marked read // We call markRead() even though the message is already
// because we need to start expiration timers, etc. // marked read because we need to start expiration
// timers, etc.
message.markRead(); message.markRead();
} }

View file

@ -119,8 +119,8 @@
Signal.Backbone.Views.Lightbox.show(this.lightboxView.el); Signal.Backbone.Views.Lightbox.show(this.lightboxView.el);
}, },
isVoiceMessage() { isVoiceMessage() {
// eslint-disable-next-line no-bitwise
if ( if (
// eslint-disable-next-line no-bitwise
this.model.flags & this.model.flags &
textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE
) { ) {

View file

@ -513,6 +513,7 @@
const statusPromise = this.throttledGetProfiles(); const statusPromise = this.throttledGetProfiles();
// eslint-disable-next-line more/no-then // eslint-disable-next-line more/no-then
this.statusFetch = statusPromise.then(() => this.statusFetch = statusPromise.then(() =>
// eslint-disable-next-line more/no-then
this.model.updateVerified().then(() => { this.model.updateVerified().then(() => {
this.onVerifiedChange(); this.onVerifiedChange();
this.statusFetch = null; this.statusFetch = null;