mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Remove duplicated combine flags code
This commit is contained in:
parent
451ffc97c4
commit
ce4b42f66b
@ -1741,23 +1741,11 @@ public class ImapStore extends Store {
|
|||||||
for (int i = 0, count = messages.length; i < count; i++) {
|
for (int i = 0, count = messages.length; i < count; i++) {
|
||||||
uids[i] = messages[i].getUid();
|
uids[i] = messages[i].getUid();
|
||||||
}
|
}
|
||||||
ArrayList<String> flagNames = new ArrayList<String>();
|
|
||||||
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 {
|
try {
|
||||||
executeSimpleCommand(String.format("UID STORE %s %sFLAGS.SILENT (%s)",
|
executeSimpleCommand(String.format("UID STORE %s %sFLAGS.SILENT (%s)",
|
||||||
Utility.combine(uids, ','),
|
Utility.combine(uids, ','),
|
||||||
value ? "+" : "-",
|
value ? "+" : "-",
|
||||||
Utility.combine(flagNames.toArray(new String[flagNames.size()]), ' ')));
|
combineFlags(flags)));
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw ioExceptionHandler(mConnection, ioe);
|
throw ioExceptionHandler(mConnection, ioe);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user