From 7c176a26d040013c9af64d4f506524f3a1f3aa8f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 7 May 2021 04:45:47 +0000 Subject: [PATCH] simplify logic --- .../ui/new_transaction/NewTransactionActivity.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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); }); -- 2.39.5