]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
splash: setup DB in the background
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index 62ab8f4b867b7eb765e02721f94599a0ce0b8713..c9e358e292451c83468ddefc923c2393a9df3fa4 100644 (file)
@@ -122,7 +122,7 @@ public final class MobileLedgerProfile {
                     result = item;
             }
         }
-        Data.profiles.setValue(list);
+        Data.profiles.postValue(list);
         return result;
     }
     public static void storeProfilesOrder() {
@@ -452,12 +452,12 @@ public final class MobileLedgerProfile {
         db.beginTransactionNonExclusive();
         try {
             Object[] uuid_param = new Object[]{uuid};
-            db.execSQL("delete from profiles where uuid=?", uuid_param);
-            db.execSQL("delete from accounts where profile=?", uuid_param);
-            db.execSQL("delete from account_values where profile=?", uuid_param);
-            db.execSQL("delete from transactions where profile=?", uuid_param);
             db.execSQL("delete from transaction_accounts where profile=?", uuid_param);
+            db.execSQL("delete from transactions where profile=?", uuid_param);
+            db.execSQL("delete from account_values where profile=?", uuid_param);
+            db.execSQL("delete from accounts where profile=?", uuid_param);
             db.execSQL("delete from options where profile=?", uuid_param);
+            db.execSQL("delete from profiles where uuid=?", uuid_param);
             db.setTransactionSuccessful();
         }
         finally {