]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
commit right after the account list is complete
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / RetrieveTransactionsTask.java
index dc73944332b728ccae78e798089fa71c11d9a35c..69b43fa6169cccd12826d483496959d79cf7bf24 100644 (file)
@@ -159,7 +159,13 @@ public class RetrieveTransactionsTask
                                 if (line.equals("<h2>General Journal</h2>")) {
                                     state = ParserState.EXPECTING_TRANSACTION;
                                     L("→ expecting transaction");
+                                    // commit the current transaction and start a new one
+                                    // the account list in the UI should reflect the (committed)
+                                    // state of the database
+                                    db.setTransactionSuccessful();
+                                    db.endTransaction();
                                     Data.accounts.set(accountList);
+                                    db.beginTransaction();
                                     continue;
                                 }
                                 m = reAccountName.matcher(line);