]> git.ktnx.net Git - mobile-ledger.git/commit
fix merging of account lists so that changes are detected
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 16 Aug 2020 13:56:30 +0000 (16:56 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 16 Aug 2020 13:57:47 +0000 (13:57 +0000)
commit1aac3d8310057f17400cd194ffcd9352f3021c11
tree9dc2d30fa2f68f844a863f62134a6451b67947a9
parent748544f53147c7e811f8b11c081ed162a3870cb3
fix merging of account lists so that changes are detected

the old code modified objects in-place, changing the existing object,
which avoids (wrongly) propagation of the change to the UI

the new code ensures a new object is used in that case (the one from
newList) which guarantees that the change will be caught by the list
differ

this fixes a problem with amounts not being updated after a refresh from
the hledger-web backend
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java
app/src/test/java/net/ktnx/mobileledger/model/MobileLedgerProfileTest.java