mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -05:00
Preparatory code for providing move/delete/copy/setFlag capabilities
across multiple folders.
This commit is contained in:
parent
56a4b94748
commit
9c761419c9
@ -4643,6 +4643,23 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Map<String, List<Message>> binMessages(Message[] messages)
|
||||
{
|
||||
Map<String, List<Message>> bins = new HashMap<String, List<Message>>();
|
||||
for (Message message : messages)
|
||||
{
|
||||
String folderName = message.getFolder().getName();
|
||||
List<Message> bin = bins.get(folderName);
|
||||
if (bin == null)
|
||||
{
|
||||
bin = new LinkedList<Message>();
|
||||
bins.put(folderName, bin);
|
||||
}
|
||||
bin.add(message);
|
||||
}
|
||||
return bins;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user