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
@Override
public int getItemCount() {
- return listDiffer.getCurrentList().size();
+ return listDiffer.getCurrentList()
+ .size();
}
public void setAccounts(MobileLedgerProfile profile, ArrayList<LedgerAccount> newList) {
this.profile = profile;