瀏覽代碼

Update ifs

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 年之前
父節點
當前提交
43a471b8f6
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java

+ 4 - 6
src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java

@@ -131,12 +131,10 @@ public class NotificationsActivity extends FileActivity {
         String account;
         Account currentAccount;
         if (getIntent() != null && getIntent().getExtras() != null &&
-                (account = getIntent().getExtras().getString(NotificationJob.KEY_NOTIFICATION_ACCOUNT)) != null) {
-            if ((currentAccount = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext())) != null) {
-                if (!account.equalsIgnoreCase(currentAccount.name)) {
-                    AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), account);
-                }
-            }
+                (account = getIntent().getExtras().getString(NotificationJob.KEY_NOTIFICATION_ACCOUNT)) != null &&
+                (currentAccount = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext())) != null &&
+                !account.equalsIgnoreCase(currentAccount.name)) {
+            AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), account);
         }
 
         swipeListRefreshLayout.setOnRefreshListener(() -> {