From 40da4baf01c262056345f31ff2a4002b83ee080b Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Wed, 23 Dec 2020 10:38:08 -0500 Subject: [PATCH] fix favourites overwrite more --- app/src/main/java/awais/instagrabber/db/AppDatabase.java | 2 +- .../main/java/awais/instagrabber/utils/ExportImportUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/db/AppDatabase.java b/app/src/main/java/awais/instagrabber/db/AppDatabase.java index 6190575a..11547601 100644 --- a/app/src/main/java/awais/instagrabber/db/AppDatabase.java +++ b/app/src/main/java/awais/instagrabber/db/AppDatabase.java @@ -161,7 +161,7 @@ public abstract class AppDatabase extends RoomDatabase { final FavoriteType type = favoriteTypeQueryPair.first; final String query = favoriteTypeQueryPair.second; oldModels.add(new Favorite( - -1, + 0, query, type, queryDisplayExists ? cursor.getString(cursor.getColumnIndex("query_display")) diff --git a/app/src/main/java/awais/instagrabber/utils/ExportImportUtils.java b/app/src/main/java/awais/instagrabber/utils/ExportImportUtils.java index dab09b03..03003ce0 100755 --- a/app/src/main/java/awais/instagrabber/utils/ExportImportUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/ExportImportUtils.java @@ -152,7 +152,7 @@ public final class ExportImportUtils { continue; } final Favorite favorite = new Favorite( - -1, + 0, query, favoriteType, favsObject.optString("s"),