X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FMobileLedgerProfile.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FMobileLedgerProfile.java;h=1f2eac7360acc17e5356fa39387363297cc24d63;hp=2cd159c5e7079c840e333f56da1e5c0c6eaf99a8;hb=6603a66690138661b04ad9c56d4b3498e64eef95;hpb=54002a662d97289a739d3cdb9888bbab58a8064f diff --git a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java index 2cd159c5..1f2eac73 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java @@ -82,8 +82,8 @@ public final class MobileLedgerProfile { SQLiteDatabase db = App.getDatabase(); try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " + "auth_password, permit_posting, theme, order_no, " + - "preferred_accounts_filter, future_dates FROM " + - "profiles order by order_no", null)) + "preferred_accounts_filter, future_dates, api_version " + + "FROM " + "profiles order by order_no", null)) { while (cursor.moveToNext()) { MobileLedgerProfile item = new MobileLedgerProfile(cursor.getString(0)); @@ -97,6 +97,7 @@ public final class MobileLedgerProfile { item.orderNo = cursor.getInt(8); item.setPreferredAccountsFilter(cursor.getString(9)); item.setFutureDates(cursor.getInt(10)); + item.setApiVersion(cursor.getInt(11)); list.add(item); if (item.getUuid() .equals(currentProfileUUID)) @@ -211,12 +212,12 @@ public final class MobileLedgerProfile { // permitPosting ? "TRUE" : "FALSE", authEnabled ? "TRUE" : "FALSE", themeId)); db.execSQL("REPLACE INTO profiles(uuid, name, permit_posting, url, " + "use_authentication, auth_user, " + - "auth_password, theme, order_no, preferred_accounts_filter, future_dates) " + - "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + "auth_password, theme, order_no, preferred_accounts_filter, future_dates, " + + "api_version) " + "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new Object[]{uuid, name, permitPosting, url, authEnabled, authEnabled ? authUserName : null, authEnabled ? authPassword : null, themeId, orderNo, - preferredAccountsFilter, futureDates.toInt() + preferredAccountsFilter, futureDates.toInt(), apiVersion.toInt() }); db.setTransactionSuccessful(); }