]> git.ktnx.net Git - mobile-ledger.git/commitdiff
slight optimization
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 1 Mar 2021 19:53:46 +0000 (21:53 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 1 Mar 2021 19:53:46 +0000 (21:53 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java

index 5478da8acc9e286ffcf8e3906d6b25bfde7f89d2..9fcc35b1a199ec2e88632435c35fa1fb15f7ee92 100644 (file)
@@ -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()));