+ 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);
+ }
+ public static int getProfileIndex(MobileLedgerProfile profile) {
+ List<MobileLedgerProfile> list = profiles.getList();
+
+ for (int i = 0; i < list.size(); i++) {
+ MobileLedgerProfile p = list.get(i);
+ if (p.equals(profile)) return i;
+ }
+
+ return -1;
+ }