]> git.ktnx.net Git - mobile-ledger.git/commit
rework pattern management machinery
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Jan 2021 11:56:08 +0000 (11:56 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Jan 2021 11:56:08 +0000 (11:56 +0000)
commitb0404689e0dbb2b08f02deca7ee5d14636a3baa6
treec542a49fddac06208036951e11abf882337a9998
parentc2bc2a73948d991a4c827d230ae93e239401b9b9
rework pattern management machinery

adding and editing of patterns mostly works (amounts not yet)

room database instantiation moved from App to DB (properly synchronised)

view holders don't hold references to corresponding items or positions
instead, they retrieve the item via getAdapterPosition() as recommended

account names/comments are stored in the DB

fix crash when a pattern with null test text is loaded
15 files changed:
app/src/main/java/net/ktnx/mobileledger/App.java
app/src/main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java
app/src/main/java/net/ktnx/mobileledger/db/DB.java
app/src/main/java/net/ktnx/mobileledger/db/PatternAccount.java
app/src/main/java/net/ktnx/mobileledger/db/PatternHeader.java
app/src/main/java/net/ktnx/mobileledger/db/PatternWithAccounts.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/model/PatternDetailsItem.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternDetailsAdapter.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternDetailsFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternDetailsViewModel.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternListFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternViewHolder.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternsActivity.java
app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternsRecyclerViewAdapter.java
app/src/main/java/net/ktnx/mobileledger/utils/Misc.java