]> git.ktnx.net Git - mobile-ledger.git/commitdiff
simplify logic
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 04:45:47 +0000 (04:45 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 04:45:47 +0000 (04:45 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java

index 2daf048369d16138eb0a1fc71d4765e6bdaff939..33234639919692db552e936a6fbbf45112d5857b 100644 (file)
@@ -364,15 +364,11 @@ public class NewTransactionActivity extends ProfileThemedActivity
 
             TransactionWithAccounts tr;
 
-            if (Misc.emptyIsNull(accFilter) != null) {
+            if (Misc.emptyIsNull(accFilter) != null)
                 tr = trDao.getFirstByDescriptionHavingAccountSync(description, accFilter);
-                if (tr != null) {
-                    model.loadTransactionIntoModel(tr);
-                    return;
-                }
-            }
+            else
+                tr = trDao.getFirstByDescriptionSync(description);
 
-            tr = trDao.getFirstByDescriptionSync(description);
             if (tr != null)
                 model.loadTransactionIntoModel(tr);
         });