Compare commits

..

4 Commits

Author SHA1 Message Date
Sylvia van Os
bf8f00f877 Merge branch 'master' of github.com:TheLastProject/loyalty-card-locker 2021-10-10 00:46:33 +02:00
Sylvia van Os
9f0b7604cb Fix botched migration and release 2.7.3 2021-10-10 00:46:20 +02:00
Sylvia van Os
6d151e7377 Merge pull request #474 from TheLastProject/create-pull-request/patch-1633816331
Update Fastlane changelogs
2021-10-10 00:02:54 +02:00
TheLastProject
6ecc94526e Update Fastlane changelogs 2021-10-09 21:52:10 +00:00
4 changed files with 26 additions and 3 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## v2.7.3 - 88 (2021-10-10)
- Fix incorrect migration making first card become invisible
## v2.7.2 - 87 (2021-10-09)
- Fix regression breaking import/export

View File

@@ -18,8 +18,8 @@ android {
applicationId "me.hackerchick.catima"
minSdkVersion 21
targetSdkVersion 31
versionCode 87
versionName "2.7.2"
versionCode 88
versionName "2.7.3"
vectorDrawables.useSupportLibrary true
multiDexEnabled true

View File

@@ -21,7 +21,7 @@ public class DBHelper extends SQLiteOpenHelper
{
public static final String DATABASE_NAME = "Catima.db";
public static final int ORIGINAL_DATABASE_VERSION = 1;
public static final int DATABASE_VERSION = 12;
public static final int DATABASE_VERSION = 13;
public static class LoyaltyCardDbGroups
{
@@ -294,6 +294,24 @@ public class DBHelper extends SQLiteOpenHelper
insertFTS(db, loyaltyCard.id, loyaltyCard.store, loyaltyCard.note);
}
}
if(oldVersion < 13 && newVersion >= 13)
{
db.execSQL("DELETE FROM " + LoyaltyCardDbFTS.TABLE + ";");
Cursor cursor = db.rawQuery("SELECT * FROM " + LoyaltyCardDbIds.TABLE + ";", null, null);
if (cursor.moveToFirst()) {
LoyaltyCard loyaltyCard = LoyaltyCard.toLoyaltyCard(cursor);
insertFTS(db, loyaltyCard.id, loyaltyCard.store, loyaltyCard.note);
while (cursor.moveToNext()) {
loyaltyCard = LoyaltyCard.toLoyaltyCard(cursor);
insertFTS(db, loyaltyCard.id, loyaltyCard.store, loyaltyCard.note);
}
}
cursor.close();
}
}
private ContentValues generateFTSContentValues(final int id, final String store, final String note) {

View File

@@ -0,0 +1 @@
- Fix regression breaking import/export