]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/UpdateTransactionsTask.java
TransactionAccumulator needs not keep a reference to the main model
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / UpdateTransactionsTask.java
index 38db6b17f8c7b30648a92d980f23626f4fbe222e..785ec1447eac017e3303a192f2e9eafe7269504a 100644 (file)
@@ -60,7 +60,7 @@ public class UpdateTransactionsTask extends AsyncTask<MainModel, Void, String> {
                                  .getAllWithAccountsFilteredSync(profileId, accFilter);
             }
 
-            TransactionAccumulator accumulator = new TransactionAccumulator(model);
+            TransactionAccumulator accumulator = new TransactionAccumulator(accFilter);
 
             for (TransactionWithAccounts tr : transactions) {
                 if (isCancelled())
@@ -69,7 +69,8 @@ public class UpdateTransactionsTask extends AsyncTask<MainModel, Void, String> {
                 accumulator.put(new LedgerTransaction(tr));
             }
 
-            accumulator.done();
+            accumulator.publishResults(model);
+
             debug("UTT", "transaction list value updated");
 
             return null;