]> git.ktnx.net Git - mobile-ledger.git/commitdiff
rename getPatternDAO to getTemplateDAO
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 5 Feb 2021 06:08:18 +0000 (08:08 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 5 Feb 2021 13:15:43 +0000 (13:15 +0000)
app/src/main/java/net/ktnx/mobileledger/db/DB.java
app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsViewModel.java
app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateListFragment.java

index a404ed963c821529be268d49868b09a04deb54c3..136f947d5c115d062a6a2d587510ba17765e742e 100644 (file)
@@ -166,7 +166,7 @@ abstract public class DB extends RoomDatabase {
                         .build();
         }
     }
-    public abstract TemplateHeaderDAO getPatternDAO();
+    public abstract TemplateHeaderDAO getTemplateDAO();
 
     public abstract TemplateAccountDAO getPatternAccountDAO();
 
index 055ebbb24eeaf537a43a62f225be175d12c940dc..6b120560b4745fba5473439beb20db44e3534239 100644 (file)
@@ -111,7 +111,7 @@ public class NewTransactionFragment extends QRScanCapableFragment {
             return;
 
         LiveData<List<TemplateHeader>> allPatterns = DB.get()
-                                                       .getPatternDAO()
+                                                       .getTemplateDAO()
                                                        .getTemplates();
         allPatterns.observe(getViewLifecycleOwner(), patternHeaders -> {
             ArrayList<TemplateHeader> matchingPatterns = new ArrayList<>();
@@ -258,7 +258,7 @@ public class NewTransactionFragment extends QRScanCapableFragment {
         listAdapter.notifyItemChanged(0);
 
         DB.get()
-          .getPatternDAO()
+          .getTemplateDAO()
           .getTemplateWithAccounts(patternHeader.getId())
           .observe(getViewLifecycleOwner(), entry -> {
               int rowIndex = 0;
index a24b97670a54b05e1d8bc3c7d9b56083e4677a48..fad2d394380b0ce97e735457d90d1843390d2c3d 100644 (file)
@@ -96,7 +96,7 @@ public class TemplateDetailsViewModel extends ViewModel {
         }
 
         DB db = DB.get();
-        LiveData<TemplateWithAccounts> dbList = db.getPatternDAO()
+        LiveData<TemplateWithAccounts> dbList = db.getTemplateDAO()
                                                   .getTemplateWithAccounts(mPatternId);
         Observer<TemplateWithAccounts> observer = new Observer<TemplateWithAccounts>() {
             @Override
@@ -140,7 +140,7 @@ public class TemplateDetailsViewModel extends ViewModel {
             TemplateDetailsItem.Header modelHeader = list.get(0)
                                                          .asHeaderItem();
             TemplateHeaderDAO headerDAO = DB.get()
-                                            .getPatternDAO();
+                                            .getTemplateDAO();
             TemplateHeader dbHeader = modelHeader.toDBO();
             if (newPattern) {
                 dbHeader.setId(null);
index 53564278fb140eefb91aa0c2d0ff49f341eea71b..c7020e95be762b2c20965c8d542f83f67d11e9f5 100644 (file)
@@ -86,7 +86,7 @@ public class TemplateListFragment extends Fragment {
 
         b.templateList.setAdapter(modelAdapter);
         TemplateHeaderDAO pDao = DB.get()
-                                   .getPatternDAO();
+                                   .getTemplateDAO();
         LiveData<List<TemplateHeader>> templates = pDao.getTemplates();
         templates.observe(getViewLifecycleOwner(), modelAdapter::setTemplates);
         LinearLayoutManager llm = new LinearLayoutManager(getContext());