]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/Data.java
toCamelCase
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / Data.java
index 3ab770b6ccb38116acc905348e45598562ff0e0f..62aecd62e1bc10290816456a6780e09f0bd40e94 100644 (file)
 
 package net.ktnx.mobileledger.model;
 
+import net.ktnx.mobileledger.utils.MLDB;
+import net.ktnx.mobileledger.utils.ObservableAtomicInteger;
+import net.ktnx.mobileledger.utils.ObservableList;
+import net.ktnx.mobileledger.utils.ObservableValue;
+
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.List;
 
 public final class Data {
     public static TransactionList transactions = new TransactionList();
     public static ObservableValue<ArrayList<LedgerAccount>> accounts =
-            new ObservableValue<>(new ArrayList<LedgerAccount>());
-    public static ObservableValue<List<String>> descriptions = new ObservableValue<>();
+            new ObservableValue<>(new ArrayList<>());
     public static ObservableAtomicInteger backgroundTaskCount = new ObservableAtomicInteger(0);
     public static ObservableValue<Date> lastUpdateDate = new ObservableValue<>();
     public static ObservableValue<MobileLedgerProfile> profile = new ObservableValue<>();
+    public static ObservableList<MobileLedgerProfile> profiles =
+            new ObservableList<>(new ArrayList<>());
+    public static ObservableValue<Boolean> optShowOnlyStarred = new ObservableValue<>();
+    public static void setCurrentProfile(MobileLedgerProfile newProfile) {
+        MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid());
+        profile.set(newProfile);
+    }
 }