From c614c3968b4917ad1f247d6f8f0ec9dd6e576bdb Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 24 Apr 2018 14:46:00 -0700 Subject: [PATCH 1/3] Enable the sending of quoted replies --- js/views/message_view.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/views/message_view.js b/js/views/message_view.js index 3c9a122b21..458883cb82 100644 --- a/js/views/message_view.js +++ b/js/views/message_view.js @@ -456,8 +456,8 @@ const contact = this.model.isIncoming() ? this.model.getContact() : null; const attachments = this.model.get('attachments'); - // TODO: used for the feature flag below - // const hasErrors = errors && errors.length > 0; + const errors = this.model.get('errors'); + const hasErrors = errors && errors.length > 0; const hasAttachments = attachments && attachments.length > 0; const hasBody = this.hasTextContents(); @@ -469,8 +469,7 @@ avatar: (contact && contact.getAvatar()), profileName: (contact && contact.getProfileName()), innerBubbleClasses: this.isImageWithoutCaption() ? '' : 'with-tail', - // TODO: Turn this on when we're ready to enable sending quoted replies - hoverIcon: false, // !hasErrors, + hoverIcon: !hasErrors, hasAttachments, reply: i18n('replyToMessage'), }, this.render_partials())); From b0b1dc6be81d084fe669dd0c79528e8f8975a4c4 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 24 Apr 2018 18:32:47 -0700 Subject: [PATCH 2/3] Apply iOS theme after link --- js/background.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/background.js b/js/background.js index 393f534751..846fda7d13 100644 --- a/js/background.js +++ b/js/background.js @@ -373,6 +373,7 @@ if (firstRun === true && deviceId != '1') { if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') { storage.put('theme-setting', 'ios'); + onChangeTheme(); } var syncRequest = new textsecure.SyncRequest(textsecure.messaging, messageReceiver); Whisper.events.trigger('contactsync:begin'); @@ -394,6 +395,12 @@ } } + function onChangeTheme() { + var view = window.owsDesktopApp.appView; + if (view) { + view.applyTheme(); + } + } function onEmpty() { initialLoadComplete = true; From 9619e5b66d58faff35e88c87da07bcac42be6725 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 24 Apr 2018 18:33:10 -0700 Subject: [PATCH 3/3] Fix quote thumbnail flickering issue Turns out that we reload thumbnails for every message when any new message is added to the conversation. This fix prevents that by actually checking for the proper sentinel on the message model --- js/models/conversations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index c5c3a4cb9f..03182f3c8c 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1250,7 +1250,7 @@ // If we already have a quoted message, then we exit early. If we don't have it, // then we'll continue to look again for an in-memory message to use. Why? This // will enable us to scroll to it when the user clicks. - if (messages.quotedMessage) { + if (message.quotedMessage) { return; }