From 2ae4f914cd2cc40645ede8a4a7f68a07f479164b Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 16 Aug 2020 16:59:08 +0300 Subject: [PATCH] rename mergeAccountLists method to better reflect its purpose it is important to note that the data comes from hledger-web and not as a result to some UI-induced change --- .../ktnx/mobileledger/model/MobileLedgerProfile.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java index 7ae6b5a9..7214e2b0 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java @@ -173,8 +173,8 @@ public final class MobileLedgerProfile { db.endTransaction(); } } - public static ArrayList mergeAccountLists(List oldList, - List newList) { + public static ArrayList mergeAccountListsFromWeb(List oldList, + List newList) { LedgerAccount oldAcc, newAcc; ArrayList merged = new ArrayList<>(); @@ -224,10 +224,10 @@ public final class MobileLedgerProfile { return merged; } - public void mergeAccountList(List newList) { + public void mergeAccountListFromWeb(List newList) { try (LockHolder l = accountsLocker.lockForWriting()) { - allAccounts = mergeAccountLists(allAccounts, newList); + allAccounts = mergeAccountListsFromWeb(allAccounts, newList); updateAccountsMap(allAccounts); } } @@ -691,7 +691,7 @@ public final class MobileLedgerProfile { db.endTransaction(); } - mergeAccountList(list); + mergeAccountListFromWeb(list); updateDisplayedAccounts(); } public synchronized Locker lockAccountsForWriting() { @@ -728,7 +728,7 @@ public final class MobileLedgerProfile { List transactions) { storeAccountAndTransactionListAsync(accounts, transactions, false); - mergeAccountList(accounts); + mergeAccountListFromWeb(accounts); updateDisplayedAccounts(); allTransactions.postValue(transactions); -- 2.39.5