diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverAPIAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverAPIAdapter.kt index 24769037..1c31413a 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverAPIAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverAPIAdapter.kt @@ -1,6 +1,7 @@ package com.readrops.api.services.fever.adapters import com.readrops.api.utils.exceptions.ParseException +import com.readrops.api.utils.extensions.skipField import com.squareup.moshi.* class FeverAPIAdapter : JsonAdapter() { @@ -15,16 +16,16 @@ class FeverAPIAdapter : JsonAdapter() { return try { beginObject() - skipName() - skipValue() + skipField() var authenticated = 0 if (nextName() == "auth") { authenticated = nextInt() } - skipName() - skipValue() + skipField() + endObject() + authenticated == 1 } catch (e: Exception) { diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFaviconsAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFaviconsAdapter.kt index e4ef7bfc..a12aebe5 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFaviconsAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFaviconsAdapter.kt @@ -57,6 +57,7 @@ class FeverFaviconsAdapter { } endArray() + endObject() favicons } catch (e: Exception) { 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 dd160e38..cfef228e 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 @@ -54,6 +54,7 @@ class FeverFeedsAdapter { endArray() skipToEnd() + endObject() feeds } catch (e: Exception) { diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFoldersAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFoldersAdapter.kt index d5131816..3a4f9dc1 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFoldersAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverFoldersAdapter.kt @@ -49,6 +49,7 @@ class FeverFoldersAdapter { endArray() skipToEnd() + endObject() folders } catch (e: Exception) { diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsAdapter.kt index a34f9a31..25be60f4 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsAdapter.kt @@ -57,6 +57,7 @@ class FeverItemsAdapter { } endArray() + endObject() items } catch (e: Exception) { diff --git a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsIdsAdapter.kt b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsIdsAdapter.kt index b796a138..43071f48 100644 --- a/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsIdsAdapter.kt +++ b/api/src/main/java/com/readrops/api/services/fever/adapters/FeverItemsIdsAdapter.kt @@ -16,13 +16,12 @@ class FeverItemsIdsAdapter { @FromJson fun fromJson(reader: JsonReader): List = with(reader) { return try { - beginObject() repeat(3) { skipField() } - nextName() // unread_items_ids field + nextName() // (unread|saved)_item_ids field val ids = nextString().split(",") endObject()