mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-03 23:35:38 +00:00
Fix message deletion threading bug
This commit is contained in:
parent
907e0e4974
commit
1fbb3d3dd5
@ -1006,7 +1006,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ThreadUtils.queue {
|
|
||||||
for (message in messages) {
|
for (message in messages) {
|
||||||
if (message.isMms) {
|
if (message.isMms) {
|
||||||
DatabaseFactory.getMmsDatabase(this@ConversationActivityV2).delete(message.id)
|
DatabaseFactory.getMmsDatabase(this@ConversationActivityV2).delete(message.id)
|
||||||
@ -1015,7 +1014,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
endActionMode()
|
endActionMode()
|
||||||
}
|
}
|
||||||
builder.setNegativeButton(android.R.string.cancel) { dialog, _ ->
|
builder.setNegativeButton(android.R.string.cancel) { dialog, _ ->
|
||||||
|
@ -57,6 +57,7 @@ import org.session.libsession.utilities.recipients.Recipient;
|
|||||||
import org.session.libsession.utilities.recipients.RecipientFormattingException;
|
import org.session.libsession.utilities.recipients.RecipientFormattingException;
|
||||||
import org.session.libsignal.utilities.JsonUtil;
|
import org.session.libsignal.utilities.JsonUtil;
|
||||||
import org.session.libsignal.utilities.Log;
|
import org.session.libsignal.utilities.Log;
|
||||||
|
import org.session.libsignal.utilities.ThreadUtils;
|
||||||
import org.session.libsignal.utilities.guava.Optional;
|
import org.session.libsignal.utilities.guava.Optional;
|
||||||
import org.thoughtcrime.securesms.attachments.MmsNotificationAttachment;
|
import org.thoughtcrime.securesms.attachments.MmsNotificationAttachment;
|
||||||
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper;
|
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper;
|
||||||
@ -883,7 +884,7 @@ public class MmsDatabase extends MessagingDatabase {
|
|||||||
public boolean delete(long messageId) {
|
public boolean delete(long messageId) {
|
||||||
long threadId = getThreadIdForMessage(messageId);
|
long threadId = getThreadIdForMessage(messageId);
|
||||||
AttachmentDatabase attachmentDatabase = DatabaseFactory.getAttachmentDatabase(context);
|
AttachmentDatabase attachmentDatabase = DatabaseFactory.getAttachmentDatabase(context);
|
||||||
attachmentDatabase.deleteAttachmentsForMessage(messageId);
|
ThreadUtils.queue(() -> attachmentDatabase.deleteAttachmentsForMessage(messageId));
|
||||||
|
|
||||||
GroupReceiptDatabase groupReceiptDatabase = DatabaseFactory.getGroupReceiptDatabase(context);
|
GroupReceiptDatabase groupReceiptDatabase = DatabaseFactory.getGroupReceiptDatabase(context);
|
||||||
groupReceiptDatabase.deleteRowsForMessage(messageId);
|
groupReceiptDatabase.deleteRowsForMessage(messageId);
|
||||||
|
@ -20,6 +20,8 @@ package org.thoughtcrime.securesms.database;
|
|||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user