From f6a5f117b82d01ead706fcf298444aaed2257127 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 26 Oct 2015 11:39:00 -0700 Subject: [PATCH] Generate thumbnails for outgoing pending messages. Fixes #4307 // FREEBIE --- .../thoughtcrime/securesms/database/AttachmentDatabase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/database/AttachmentDatabase.java b/src/org/thoughtcrime/securesms/database/AttachmentDatabase.java index 43d4d9df83..7dae60b794 100644 --- a/src/org/thoughtcrime/securesms/database/AttachmentDatabase.java +++ b/src/org/thoughtcrime/securesms/database/AttachmentDatabase.java @@ -150,7 +150,7 @@ public class AttachmentDatabase extends Database { notifyConversationListeners(DatabaseFactory.getMmsDatabase(context).getThreadIdForMessage(mmsId)); } - public @Nullable Attachment getAttachment(AttachmentId attachmentId) { + public @Nullable DatabaseAttachment getAttachment(AttachmentId attachmentId) { SQLiteDatabase database = databaseHelper.getReadableDatabase(); Cursor cursor = null; @@ -518,9 +518,9 @@ public class AttachmentDatabase extends Database { return stream; } - Attachment attachment = getAttachment(attachmentId); + DatabaseAttachment attachment = getAttachment(attachmentId); - if (attachment == null || attachment.isInProgress()) { + if (attachment == null || !attachment.hasData()) { return null; }