diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java index 450e7c2d23..7f92f366a8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java @@ -634,7 +634,7 @@ public class SmsDatabase extends MessagingDatabase { long threadId = getThreadIdForMessage(messageId); db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""}); notifyConversationListeners(threadId); - boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, true); + boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, false); return threadDeleted; } diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index 73dadda2cb..78e1814d51 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -1371,7 +1371,12 @@ open class Storage( val threadDB = DatabaseComponent.get(context).threadDatabase() val groupDB = DatabaseComponent.get(context).groupDatabase() threadDB.deleteConversation(threadID) - val recipient = getRecipientForThread(threadID) ?: return + + val recipient = getRecipientForThread(threadID) + if (recipient == null) { Log.w(TAG, "Got null recipient when deleting conversation - aborting."); return } + + Log.w("[ACL]", "When deleting conversation, recipient is: ${recipient.name}") + when { recipient.isContactRecipient -> { if (recipient.isLocalNumber) return