From 465b36a12a3d6f354e13d1048f78c54b44548c6d Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 1 Mar 2021 21:53:46 +0200 Subject: [PATCH] slight optimization --- .../ui/new_transaction/NewTransactionItemHolder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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())); -- 2.39.5