]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/Data.java
splash: setup DB in the background
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / model / Data.java
index 6d51287f35bfa6a74c138a15d4dbb0f83143b818..f0ba846ec05d9271a7c4f390631cde6a9906c4e5 100644 (file)
@@ -59,7 +59,10 @@ public final class Data {
     public static final MutableLiveData<Date> lastUpdateDate = new MutableLiveData<>(null);
     public static final MutableLiveData<Integer> lastUpdateTransactionCount =
             new MutableLiveData<>(0);
-    public static final ObservableValue<String> lastUpdateText = new ObservableValue<>();
+    public static final MutableLiveData<Integer> lastUpdateAccountCount = new MutableLiveData<>(0);
+    public static final ObservableValue<String> lastTransactionsUpdateText =
+            new ObservableValue<>();
+    public static final ObservableValue<String> lastAccountsUpdateText = new ObservableValue<>();
     private static final MutableLiveData<MobileLedgerProfile> profile =
             new InertMutableLiveData<>();
     private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
@@ -89,7 +92,7 @@ public final class Data {
     }
     public static void setCurrentProfile(@NonNull MobileLedgerProfile newProfile) {
         MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid());
-        profile.setValue(newProfile);
+        profile.postValue(newProfile);
     }
     public static int getProfileIndex(MobileLedgerProfile profile) {
         try (LockHolder ignored = profilesLocker.lockForReading()) {