1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Simplify control flow

This commit is contained in:
cketti 2015-02-09 18:45:42 +01:00
parent 26eb1f52e5
commit 5c036e2991

View File

@ -98,7 +98,10 @@ public class MessageCryptoHelper {
}
private void decryptOrVerifyNextPartOrStartExtractingTextAndAttachments() {
if (!partsToDecryptOrVerify.isEmpty()) {
if (partsToDecryptOrVerify.isEmpty()) {
returnResultToFragment();
return;
}
Part part = partsToDecryptOrVerify.peekFirst();
if ("text/plain".equalsIgnoreCase(part.getMimeType())) {
@ -114,12 +117,6 @@ public class MessageCryptoHelper {
partsToDecryptOrVerify.removeFirst();
decryptOrVerifyNextPartOrStartExtractingTextAndAttachments();
}
return;
}
returnResultToFragment();
}
private void startDecryptingOrVerifyingPart(Part part) {