]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/Data.java
adopt Room for displaying account lists
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / model / Data.java
index 3520711bff846952c7c2c6bc61b73cdb706fb730..24e3042ad193de358adec2ee48680187d4e53850 100644 (file)
@@ -32,7 +32,6 @@ import net.ktnx.mobileledger.utils.LockHolder;
 import net.ktnx.mobileledger.utils.Locker;
 import net.ktnx.mobileledger.utils.Logger;
 import net.ktnx.mobileledger.utils.MLDB;
-import net.ktnx.mobileledger.utils.ObservableValue;
 
 import java.text.NumberFormat;
 import java.text.ParseException;
@@ -62,9 +61,9 @@ public final class Data {
     public static final MutableLiveData<Integer> lastUpdateTransactionCount =
             new MutableLiveData<>(0);
     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<>();
+    public static final MutableLiveData<String> lastTransactionsUpdateText =
+            new MutableLiveData<>();
+    public static final MutableLiveData<String> lastAccountsUpdateText = new MutableLiveData<>();
     private static final MutableLiveData<MobileLedgerProfile> profile =
             new InertMutableLiveData<>();
     private static final AtomicInteger backgroundTaskCount = new AtomicInteger(0);
@@ -136,7 +135,7 @@ public final class Data {
             return -1;
 
         SQLiteDatabase db = App.getDatabase();
-        try (Cursor c = db.rawQuery("SELECT theme from profiles where uuid=?",
+        try (Cursor c = db.rawQuery("SELECT theme from profiles where id=?",
                 new String[]{String.valueOf(profileId)}))
         {
             if (c.moveToNext())