From ce4b42f66bcc6fc5e667818fc6dc42f221c9e391 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 29 Sep 2011 20:39:36 -0700 Subject: [PATCH] Remove duplicated combine flags code --- src/com/fsck/k9/mail/store/ImapStore.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 7299cbe03..3b8cdbdba 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -1741,23 +1741,11 @@ public class ImapStore extends Store { for (int i = 0, count = messages.length; i < count; i++) { uids[i] = messages[i].getUid(); } - ArrayList flagNames = new ArrayList(); - for (Flag flag : flags) { - if (flag == Flag.SEEN) { - flagNames.add("\\Seen"); - } else if (flag == Flag.DELETED) { - flagNames.add("\\Deleted"); - } else if (flag == Flag.ANSWERED) { - flagNames.add("\\Answered"); - } else if (flag == Flag.FLAGGED) { - flagNames.add("\\Flagged"); - } - } try { executeSimpleCommand(String.format("UID STORE %s %sFLAGS.SILENT (%s)", Utility.combine(uids, ','), value ? "+" : "-", - Utility.combine(flagNames.toArray(new String[flagNames.size()]), ' '))); + combineFlags(flags))); } catch (IOException ioe) { throw ioExceptionHandler(mConnection, ioe); }