]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java
fu no context for getWritableDatabase
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / account_summary / AccountSummaryViewModel.java
index 999f16f2d9d93d217604613ac154f8277c9fbb17..26d97c5358e000d089be71fe9678bf3aa02fd429 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2018 Damyan Ivanov.
+ * Copyright © 2019 Damyan Ivanov.
  * This file is part of Mobile-Ledger.
  * Mobile-Ledger is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -91,7 +91,7 @@ class AccountSummaryViewModel extends AndroidViewModel {
         }
     }
     void commitSelections(Context context) {
-        try(SQLiteDatabase db = MLDB.getWritableDatabase(context)) {
+        try (SQLiteDatabase db = MLDB.getWritableDatabase()) {
             db.beginTransaction();
             try {
                 for (LedgerAccount acc : accounts) {