From: Damyan Ivanov Date: Mon, 1 Mar 2021 19:53:46 +0000 (+0200) Subject: slight optimization X-Git-Tag: v0.17.0~56 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=465b36a12a3d6f354e13d1048f78c54b44548c6d;p=mobile-ledger.git slight optimization --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java index 5478da8a..9fcc35b1 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java @@ -492,8 +492,8 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder head.setDate(String.valueOf(b.newTransactionDate.getText())); // transaction description is required - if (!significantChange && TextUtils.isEmpty(head.getDescription()) != - TextUtils.isEmpty(b.newTransactionDescription.getText())) + if (TextUtils.isEmpty(head.getDescription()) != + TextUtils.isEmpty(b.newTransactionDescription.getText())) significantChange = true; head.setDescription(String.valueOf(b.newTransactionDescription.getText())); @@ -503,8 +503,8 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder NewTransactionModel.TransactionAccount acc = item.toTransactionAccount(); // having account name is important - if (!significantChange && TextUtils.isEmpty(acc.getAccountName()) != - TextUtils.isEmpty(b.accountRowAccName.getText())) + if (TextUtils.isEmpty(acc.getAccountName()) != + TextUtils.isEmpty(b.accountRowAccName.getText())) significantChange = true; acc.setAccountName(String.valueOf(b.accountRowAccName.getText()));