+
+ public static class Account extends AccountListItem {
+ private final LedgerAccount account;
+ public Account(@NotNull LedgerAccount account) {
+ this.account = account;
+ }
+ @Override
+ public boolean sameContent(AccountListItem other) {
+ if (!(other instanceof Account))
+ return false;
+ return ((Account) other).account.hasSubAccounts() == account.hasSubAccounts() &&
+ ((Account) other).account.amountsExpanded() == account.amountsExpanded() &&
+ ((Account) other).account.isExpanded() == account.isExpanded() &&
+ ((Account) other).account.getLevel() == account.getLevel() &&
+ ((Account) other).account.getAmountsString()
+ .equals(account.getAmountsString());
+ }
+ }
+
+ public static class Header extends AccountListItem {
+ private final LiveData<String> text;
+ public Header(@NonNull LiveData<String> text) {
+ this.text = text;
+ }
+ public LiveData<String> getText() {
+ return text;
+ }
+ @Override
+ public boolean sameContent(AccountListItem other) {
+ return true;
+ }
+ }