]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
more asynchronous account list (re-)loading
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index db8f8de76a9b7b4d328b4f82b48e636bcebefa60..86d4cc457f0155322808d720eb57074c5cdefce8 100644 (file)
@@ -206,7 +206,7 @@ public class RetrieveTransactionsTask
                                 // state of the database
                                 db.setTransactionSuccessful();
                                 db.endTransaction();
-                                Data.accounts.setList(accountList);
+                                profile.setAccounts(accountList);
                                 db.beginTransaction();
                                 continue;
                             }
@@ -527,16 +527,13 @@ public class RetrieveTransactionsTask
                 profile.deleteNotPresentAccounts(db);
                 throwIfCancelled();
                 db.setTransactionSuccessful();
-                listFilledOK = true;
             }
             finally {
                 db.endTransaction();
             }
         }
-        // should not be set in the DB transaction, because of a possible deadlock
-        // with the main and DbOpQueueRunner threads
-        if (listFilledOK)
-            Data.accounts.setList(accountList);
+
+        profile.setAccounts(accountList);
 
         return true;
     }