From de897f405d8b9885835dd8ecc7c622607b3716a0 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 23 Apr 2021 04:56:14 +0000 Subject: [PATCH] inline the storeAccountsAndTransactions method it is a bit silly to have run() that only calls one method --- .../mobileledger/async/RetrieveTransactionsTask.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java index 0e42f87d..9636208b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -715,8 +715,8 @@ public class RetrieveTransactionsTask extends this.accounts = accounts; this.transactions = transactions; } - private void storeAccountsAndTransactions(List accounts, - List transactions) { + @Override + public void run() { AccountDAO accDao = DB.get() .getAccountDAO(); TransactionDAO trDao = DB.get() @@ -730,8 +730,7 @@ public class RetrieveTransactionsTask extends if (existing != null) { a.account.setExpanded(existing.isExpanded()); a.account.setAmountsExpanded(existing.isAmountsExpanded()); - a.account.setId( - existing.getId()); // not strictly needed, but since we have it + a.account.setId(existing.getId()); // not strictly needed, but since we have it // anyway... } @@ -757,9 +756,5 @@ public class RetrieveTransactionsTask extends .insertSync(new Option(profile.getId(), Option.OPT_LAST_SCRAPE, String.valueOf((new Date()).getTime()))); } - @Override - public void run() { - storeAccountsAndTransactions(accounts, transactions); - } } } -- 2.39.5