Load thumbnail even if we have the full message in hand

This is important for now, when we aren't generating our own thumbnails
This commit is contained in:
Scott Nonnenberg 2018-04-13 16:17:17 -07:00
parent c283ba1a12
commit 3bbb9f535a
No known key found for this signature in database
GPG key ID: 5F82280C35134661
2 changed files with 29 additions and 9 deletions

View file

@ -366,14 +366,19 @@
this.timerView.update();
},
getQuoteObjectUrl() {
if (this.model.quotedMessageFromDatabase) {
return this.model.quotedMessageFromDatabase.imageUrl;
const fromDB = this.model.quotedMessageFromDatabase;
if (fromDB && fromDB.imageUrl) {
return fromDB.imageUrl;
}
if (this.model.quotedMessage) {
return this.model.quotedMessage.imageUrl;
const inMemory = this.model.quotedMessage;
if (inMemory && inMemory.imageUrl) {
return inMemory.imageUrl;
}
if (this.model.quoteThumbnail) {
return this.model.quoteThumbnail.objectUrl;
const thumbnail = this.model.quoteThumbnail;
if (thumbnail && thumbnail.objectUrl) {
return thumbnail.objectUrl;
}
return null;