]> git.ktnx.net Git - mobile-ledger.git/commitdiff
drop long unused methods
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 9 Jun 2020 20:10:17 +0000 (20:10 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 9 Jun 2020 20:10:17 +0000 (20:10 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java

index f55a7aec59361cf00bc7f7179b8cc4ee72868611..060828e746424e69f90f37704d469d30209cfbd8 100644 (file)
@@ -103,29 +103,6 @@ public class AccountSummaryAdapter
         return Data.accounts.size() + (Data.profile.getValue()
                                                    .isPostingPermitted() ? 1 : 0);
     }
-    public void selectItem(int position) {
-        try (LockHolder lh = Data.accounts.lockForWriting()) {
-            LedgerAccount acc = Data.accounts.get(position);
-            acc.toggleHiddenToBe();
-            toggleChildrenOf(acc, acc.isHiddenByStarToBe(), position);
-            notifyItemChanged(position);
-        }
-    }
-    private void toggleChildrenOf(LedgerAccount parent, boolean hiddenToBe, int parentPosition) {
-        int i = parentPosition + 1;
-        try (LockHolder lh = Data.accounts.lockForWriting()) {
-            for (int j = 0; j < Data.accounts.size(); j++) {
-                LedgerAccount acc = Data.accounts.get(j);
-                if (acc.getName().startsWith(parent.getName() + ":")) {
-                    acc.setHiddenByStarToBe(hiddenToBe);
-                    notifyItemChanged(i);
-                    toggleChildrenOf(acc, hiddenToBe, i);
-                    i++;
-                }
-            }
-        }
-    }
-
     static class LedgerRowHolder extends RecyclerView.ViewHolder {
         TextView tvAccountName, tvAccountAmounts;
         ConstraintLayout row;