Simplify logic in ActivityListener.getActionInProgressOperation()

This commit is contained in:
cketti 2017-08-29 18:12:58 +02:00
parent 349b7bbcee
commit 1b364755df

View file

@ -83,13 +83,14 @@ public class ActivityListener extends SimpleMessagingListener {
} else { } else {
displayName = loadingFolderName; displayName = loadingFolderName;
} }
if (account != null && account.getInboxFolderName() != null &&
account.getInboxFolderName().equalsIgnoreCase(displayName)) { if (account != null) {
if (displayName.equalsIgnoreCase(account.getInboxFolderName())) {
displayName = context.getString(R.string.special_mailbox_name_inbox); displayName = context.getString(R.string.special_mailbox_name_inbox);
} else if (account != null && account.getOutboxFolderName() != null && } else if (displayName.equalsIgnoreCase(account.getOutboxFolderName())) {
account.getOutboxFolderName().equals(displayName)) {
displayName = context.getString(R.string.special_mailbox_name_outbox); displayName = context.getString(R.string.special_mailbox_name_outbox);
} }
}
if (loadingHeaderFolderName != null) { if (loadingHeaderFolderName != null) {
return context.getString(R.string.status_loading_account_folder_headers, return context.getString(R.string.status_loading_account_folder_headers,