From d2dff633e1a2d68b6882b83762db9beff550d336 Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Mon, 18 Nov 2024 21:35:59 +0100 Subject: [PATCH 1/2] Fix FeverFeedsAdapter parsing (fixes #228) --- .../fever/adapters/FeverFeedsAdapter.kt | 20 ++++++++++++------- .../test/resources/services/fever/feeds.json | 5 +++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFeedsAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFeedsAdapter.kt index ee778359..8c4fb532 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFeedsAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFeedsAdapter.kt @@ -31,14 +31,12 @@ class FeverFeedsAdapter : JsonAdapter() { beginObject() - // skip based fields (api_version, auth, last_refreshed...) - repeat(3) { - skipField() + while (nextName() != "feeds") { + skipValue() } - nextName() // beginning of feeds array + // feeds array beginArray() - while (hasNext()) { beginObject() @@ -62,9 +60,12 @@ class FeverFeedsAdapter : JsonAdapter() { endArray() - nextName() - beginArray() + while (nextName() != "feeds_groups") { + skipValue() + } + // feeds_groups array + beginArray() while (hasNext()) { beginObject() @@ -83,6 +84,11 @@ class FeverFeedsAdapter : JsonAdapter() { } endArray() + + while (peek() != JsonReader.Token.END_OBJECT) { + skipField() + } + endObject() FeverFeeds( diff --git a/api/src/test/resources/services/fever/feeds.json b/api/src/test/resources/services/fever/feeds.json index db6d291d..fd8883f2 100644 --- a/api/src/test/resources/services/fever/feeds.json +++ b/api/src/test/resources/services/fever/feeds.json @@ -1,7 +1,6 @@ { "api_version": 3, "auth": 1, - "last_refreshed_on_time": 1640284745, "feeds": [ { "id": 32, @@ -13,10 +12,12 @@ "last_updated_on_time": 1640364024 } ], + "last_refreshed_on_time": 1640284745, "feeds_groups": [ { "group_id": 3, "feed_ids": "5,4" } - ] + ], + "another_field": "another_value" } \ No newline at end of file From 383aea0775198c71832c98b458b5e2ef16c2d51d Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Mon, 18 Nov 2024 22:19:41 +0100 Subject: [PATCH 2/2] v2.0.2 --- CHANGELOG.md | 4 ++++ app/build.gradle.kts | 4 ++-- fastlane/metadata/android/en-US/changelogs/19.txt | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/19.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index bd817196..324c8830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.0.2 +- Fix crash when opening app from a notification (#223) +- Fix Fever API synchronization error (#228) + # v2.0.1 - Make Timeline tab filters persistent (#138) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4c64d4b9..991d71b5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -12,8 +12,8 @@ android { defaultConfig { applicationId = "com.readrops.app" - versionCode = 18 - versionName = "2.0.1" + versionCode = 19 + versionName = "2.0.2" } buildTypes { diff --git a/fastlane/metadata/android/en-US/changelogs/19.txt b/fastlane/metadata/android/en-US/changelogs/19.txt new file mode 100644 index 00000000..facd054f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/19.txt @@ -0,0 +1,2 @@ +* Fix crash when opening app from a notification (#223) +* Fix Fever API synchronization error (#228)