1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-31 15:20:09 -05:00

Fix deleteThreadsSynchronous()

This commit is contained in:
cketti 2012-11-03 04:25:40 +01:00
parent fb5e8eea84
commit 36b572fa5f

View File

@ -3590,7 +3590,9 @@ public class MessagingController implements Runnable {
List<Message> messagesToDelete = new ArrayList<Message>(); List<Message> messagesToDelete = new ArrayList<Message>();
for (Message message : messages) { for (Message message : messages) {
long rootId = ((LocalMessage) message).getRootId(); long rootId = ((LocalMessage) message).getRootId();
Message[] messagesInThread = localStore.getMessagesInThread(rootId); long threadId = (rootId == -1) ? message.getId() : rootId;
Message[] messagesInThread = localStore.getMessagesInThread(threadId);
Collections.addAll(messagesToDelete, messagesInThread); Collections.addAll(messagesToDelete, messagesInThread);
} }