From: Damyan Ivanov Date: Fri, 5 Feb 2021 06:15:37 +0000 (+0200) Subject: rename getPatternAccountDAO() to getTemplateAccountDAO() X-Git-Tag: v0.17.0~157 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=9f938da85f3d6277e4b2b274b9039e47fdb4e3fa;p=mobile-ledger.git rename getPatternAccountDAO() to getTemplateAccountDAO() --- diff --git a/app/src/main/java/net/ktnx/mobileledger/db/DB.java b/app/src/main/java/net/ktnx/mobileledger/db/DB.java index 136f947d..1e0a380f 100644 --- a/app/src/main/java/net/ktnx/mobileledger/db/DB.java +++ b/app/src/main/java/net/ktnx/mobileledger/db/DB.java @@ -168,7 +168,7 @@ abstract public class DB extends RoomDatabase { } public abstract TemplateHeaderDAO getTemplateDAO(); - public abstract TemplateAccountDAO getPatternAccountDAO(); + public abstract TemplateAccountDAO getTemplateAccountDAO(); public abstract CurrencyDAO getCurrencyDAO(); } diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsViewModel.java index fad2d394..8a5300ca 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsViewModel.java @@ -154,8 +154,8 @@ public class TemplateDetailsViewModel extends ViewModel { modelHeader)); - TemplateAccountDAO paDAO = DB.get() - .getPatternAccountDAO(); + TemplateAccountDAO taDAO = DB.get() + .getTemplateAccountDAO(); for (int i = 1; i < list.size(); i++) { final TemplateDetailsItem.AccountRow accRowItem = list.get(i) .asAccountRowItem(); @@ -164,10 +164,10 @@ public class TemplateDetailsViewModel extends ViewModel { dbAccount.setPosition(i); if (newPattern) { dbAccount.setId(null); - dbAccount.setId(paDAO.insert(dbAccount)); + dbAccount.setId(taDAO.insert(dbAccount)); } else - paDAO.update(dbAccount); + taDAO.update(dbAccount); Logger.debug("pattern-db", String.format(Locale.US, "Stored pattern account %d, account=%s, comment=%s, neg=%s, item=%s",