mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-04 16:45:09 -05: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,13 +1170,10 @@ public class MessageList
|
|||||||
* Never {@code null}.
|
* Never {@code null}.
|
||||||
*/
|
*/
|
||||||
private void onDelete(final List<MessageInfoHolder> holders) {
|
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>();
|
final List<Message> messagesToRemove = new ArrayList<Message>();
|
||||||
for (MessageInfoHolder holder : holders) {
|
for (MessageInfoHolder holder : holders) {
|
||||||
if (holder.selected) {
|
|
||||||
messagesToRemove.add(holder.message);
|
messagesToRemove.add(holder.message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
mHandler.removeMessages(holders);
|
mHandler.removeMessages(holders);
|
||||||
mController.deleteMessages(messagesToRemove.toArray(EMPTY_MESSAGE_ARRAY), null);
|
mController.deleteMessages(messagesToRemove.toArray(EMPTY_MESSAGE_ARRAY), null);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user