]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/LedgerAccount.java
whitespace
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / LedgerAccount.java
index 256be6f082f7ee936f94943efde6782cf82386c3..7510576a81a65fdd31792158514f40c474f8c8ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
 
 package net.ktnx.mobileledger.model;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
 public class LedgerAccount {
     static Pattern reHigherAccount = Pattern.compile("^[^:]+:");
     private String name;
     private String shortName;
     private int level;
     private String parentName;
-    private boolean hiddenByStar;
     private boolean hiddenByStarToBe;
     private boolean expanded;
     private List<LedgerAmount> amounts;
@@ -40,12 +39,10 @@ public class LedgerAccount {
 
     public LedgerAccount(String name) {
         this.setName(name);
-        hiddenByStar = false;
     }
 
     public LedgerAccount(String name, float amount) {
         this.setName(name);
-        this.hiddenByStar = false;
         this.expanded = true;
         this.amounts = new ArrayList<LedgerAmount>();
         this.addAmount(amount);
@@ -65,8 +62,6 @@ public class LedgerAccount {
     //  - it is starred (not hidden by a star)
     //  - and it has an expanded parent or is a top account
     public boolean isVisible() {
-        if (hiddenByStar) return false;
-
         if (level == 0) return true;
 
         return isVisible(Data.accounts);
@@ -82,12 +77,6 @@ public class LedgerAccount {
     public boolean isParentOf(LedgerAccount potentialChild) {
         return potentialChild.getName().startsWith(name + ":");
     }
-    public boolean isHiddenByStar() {
-        return hiddenByStar;
-    }
-    public void setHiddenByStar(boolean hiddenByStar) {
-        this.hiddenByStar = hiddenByStar;
-    }
     private void stripName() {
         level = 0;
         shortName = name;
@@ -159,10 +148,6 @@ public class LedgerAccount {
     public String getParentName() {
         return parentName;
     }
-    public void togglehidden() {
-        hiddenByStar = !hiddenByStar;
-    }
-
     public boolean isHiddenByStarToBe() {
         return hiddenByStarToBe;
     }