From 9c761419c938e97e71669bda7d823ebaaa7803b0 Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Wed, 6 Jan 2010 05:41:19 +0000 Subject: [PATCH] Preparatory code for providing move/delete/copy/setFlag capabilities across multiple folders. --- src/com/fsck/k9/MessagingController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/com/fsck/k9/MessagingController.java b/src/com/fsck/k9/MessagingController.java index b7cb30425..48b2a1057 100644 --- a/src/com/fsck/k9/MessagingController.java +++ b/src/com/fsck/k9/MessagingController.java @@ -4643,6 +4643,23 @@ public class MessagingController implements Runnable } } + + private Map> binMessages(Message[] messages) + { + Map> bins = new HashMap>(); + for (Message message : messages) + { + String folderName = message.getFolder().getName(); + List bin = bins.get(folderName); + if (bin == null) + { + bin = new LinkedList(); + bins.put(folderName, bin); + } + bin.add(message); + } + return bins; + }