From: Damyan Ivanov Date: Fri, 7 May 2021 04:45:47 +0000 (+0000) Subject: simplify logic X-Git-Tag: v0.19.0~18 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=7c176a26d040013c9af64d4f506524f3a1f3aa8f;p=mobile-ledger.git simplify logic --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java index 2daf0483..33234639 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionActivity.java @@ -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); });