package net.ktnx.mobileledger.model;
-import java.util.List;
+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;
public final class Data {
public static TransactionList transactions = new TransactionList();
- public static ObservableValue<List<LedgerAccount>> accounts = new ObservableValue<>();
- public static ObservableValue<List<String>> descriptions = new ObservableValue<>();
+ public static ObservableValue<ArrayList<LedgerAccount>> accounts =
+ 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);
+ }
}