From b9517bfb5fb2a15aebbf8395a70944b4efac8af3 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 2 Jan 2019 20:44:03 +0000 Subject: [PATCH] fu no context for getWritableDatabase --- .../ui/account_summary/AccountSummaryViewModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java index 999f16f2..26d97c53 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java @@ -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) { -- 2.39.5