From: Damyan Ivanov Date: Sun, 16 Aug 2020 13:59:08 +0000 (+0300) Subject: rename mergeAccountLists method to better reflect its purpose X-Git-Tag: v0.16.0~97 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger-staging.git;a=commitdiff_plain;h=2ae4f914cd2cc40645ede8a4a7f68a07f479164b 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 --- 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);