mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 08:35:08 -04:00
the refactoring to combine batch and record logic added an extra check
that broke delete of single messages from message list.
This commit is contained in:
parent
4fe8b23349
commit
7b7601082b
@ -1170,12 +1170,9 @@ public class MessageList
|
||||
* Never {@code null}.
|
||||
*/
|
||||
private void onDelete(final List<MessageInfoHolder> holders) {
|
||||
// FIXME: removeMessage does it own check on the 'selected' field, we're duplicating the logic here...
|
||||
final List<Message> messagesToRemove = new ArrayList<Message>();
|
||||
for (MessageInfoHolder holder : holders) {
|
||||
if (holder.selected) {
|
||||
messagesToRemove.add(holder.message);
|
||||
}
|
||||
messagesToRemove.add(holder.message);
|
||||
}
|
||||
mHandler.removeMessages(holders);
|
||||
mController.deleteMessages(messagesToRemove.toArray(EMPTY_MESSAGE_ARRAY), null);
|
||||
|
Loading…
Reference in New Issue
Block a user