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.
This commit is contained in:
Scott Nonnenberg 2018-07-18 12:20:14 -07:00
parent 5e64e4ef40
commit c2c8dc5090
3 changed files with 9 additions and 11 deletions

View file

@ -800,7 +800,7 @@
thumbnail: thumbnail
? {
...(await loadAttachmentData(thumbnail)),
path: getAbsoluteAttachmentPath(thumbnail.path),
objectUrl: getAbsoluteAttachmentPath(thumbnail.path),
}
: null,
};

View file

@ -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,

View file

@ -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 {