1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Be more careful about deleting messages from the MessageListAdapter -

don't do it from something that's not the UI thread
This commit is contained in:
Jesse Vincent 2010-11-05 01:16:35 +00:00
parent 4aba667a4e
commit 602099cfd3

View File

@ -2287,6 +2287,8 @@ public class MessageList
}
}
public void pruneDirtyMessages()
{
synchronized (mAdapter.messages)
{
Iterator<MessageInfoHolder> iter = mAdapter.messages.iterator();
while (iter.hasNext())
@ -2299,7 +2301,8 @@ public class MessageList
mSelectedCount--;
toggleBatchButtons();
}
iter.remove();
mAdapter.removeMessage(holder);
}
}
}
}