]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java
whitespace
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / account_summary / AccountSummaryAdapter.java
index ee46b9c705dea401a2f1e7e1e00c689383cd273d..c0ed9bd7a4f3421c28b7df2bfb86323d03e9f26a 100644 (file)
@@ -62,13 +62,15 @@ public class AccountSummaryAdapter
             public boolean areContentsTheSame(@NotNull LedgerAccount oldItem,
                                               @NotNull LedgerAccount newItem) {
                 return (oldItem.isExpanded() == newItem.isExpanded()) &&
-                       (oldItem.amountsExpanded() == newItem.amountsExpanded());
+                       (oldItem.amountsExpanded() == newItem.amountsExpanded() &&
+                        TextUtils.equals(oldItem.getAmountsString(), newItem.getAmountsString()));
             }
         });
     }
 
     public void onBindViewHolder(@NonNull LedgerRowHolder holder, int position) {
-        holder.bindToAccount(listDiffer.getCurrentList().get(position));
+        holder.bindToAccount(listDiffer.getCurrentList()
+                                       .get(position));
     }
 
     @NonNull
@@ -81,7 +83,8 @@ public class AccountSummaryAdapter
 
     @Override
     public int getItemCount() {
-        return listDiffer.getCurrentList().size();
+        return listDiffer.getCurrentList()
+                         .size();
     }
     public void setAccounts(MobileLedgerProfile profile, ArrayList<LedgerAccount> newList) {
         this.profile = profile;