From c2c8dc5090fe0058d6553d5ee4a5104694e17216 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 18 Jul 2018 12:20:14 -0700 Subject: [PATCH] Make quote props consistent, white circle dark theme play overlay Prevents errors in the logs about attempting to load images from their relative patn instead of the absolute path. No effect on the user. --- js/models/conversations.js | 2 +- js/models/messages.js | 16 +++++++--------- stylesheets/_theme_dark.scss | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index e0d03a4b7..32a20a269 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -800,7 +800,7 @@ thumbnail: thumbnail ? { ...(await loadAttachmentData(thumbnail)), - path: getAbsoluteAttachmentPath(thumbnail.path), + objectUrl: getAbsoluteAttachmentPath(thumbnail.path), } : null, }; diff --git a/js/models/messages.js b/js/models/messages.js index b5f23a1a5..be16fa372 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -280,17 +280,15 @@ return ConversationController.get(author); }, - processAttachment(attachment, externalObjectUrl) { + processQuoteAttachment(attachment, externalObjectUrl) { const { thumbnail } = attachment; const objectUrl = (thumbnail && thumbnail.objectUrl) || externalObjectUrl; - const path = thumbnail && thumbnail.path; - const thumbnailWithObjectUrl = - !objectUrl && !path - ? null - : Object.assign({}, attachment.thumbnail || {}, { - objectUrl: objectUrl || path, - }); + const thumbnailWithObjectUrl = !objectUrl + ? null + : Object.assign({}, attachment.thumbnail || {}, { + objectUrl, + }); return Object.assign({}, attachment, { isVoiceMessage: Signal.Types.Attachment.isVoiceMessage(attachment), @@ -590,7 +588,7 @@ return { text: this.createNonBreakingLastSeparator(quote.text), attachment: firstAttachment - ? this.processAttachment(firstAttachment, objectUrl) + ? this.processQuoteAttachment(firstAttachment, objectUrl) : null, isFromMe, authorPhoneNumber, diff --git a/stylesheets/_theme_dark.scss b/stylesheets/_theme_dark.scss index 6e0b2a44b..588c1cb56 100644 --- a/stylesheets/_theme_dark.scss +++ b/stylesheets/_theme_dark.scss @@ -942,7 +942,7 @@ body.dark-theme { } .module-quote__icon-container__circle-background { - background-color: $color-black; + background-color: $color-white; } .module-quote__icon-container__icon--file {