This commit is contained in:
alansley 2024-04-18 07:03:27 +10:00
parent 0ab0ecbb55
commit 26fb268c76
2 changed files with 7 additions and 2 deletions

View File

@ -634,7 +634,7 @@ public class SmsDatabase extends MessagingDatabase {
long threadId = getThreadIdForMessage(messageId); long threadId = getThreadIdForMessage(messageId);
db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""}); db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""});
notifyConversationListeners(threadId); notifyConversationListeners(threadId);
boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, true); boolean threadDeleted = DatabaseComponent.get(context).threadDatabase().update(threadId, false, false);
return threadDeleted; return threadDeleted;
} }

View File

@ -1371,7 +1371,12 @@ open class Storage(
val threadDB = DatabaseComponent.get(context).threadDatabase() val threadDB = DatabaseComponent.get(context).threadDatabase()
val groupDB = DatabaseComponent.get(context).groupDatabase() val groupDB = DatabaseComponent.get(context).groupDatabase()
threadDB.deleteConversation(threadID) 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 { when {
recipient.isContactRecipient -> { recipient.isContactRecipient -> {
if (recipient.isLocalNumber) return if (recipient.isLocalNumber) return