Skip to content

Commit

Permalink
samuelclay#1921 Fix ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
sictiru committed Dec 31, 2024
1 parent 0b668ea commit c2815fe
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class StoriesResponseTypeAdapter : JsonDeserializer<StoriesResponse> {
if (feedsElement != null && feedsElement.isJsonObject) {
val feedsArray = JsonArray()
val feedsJsonObj = feedsElement.asJsonObject
feedsJsonObj.entrySet().forEach {
feedsArray.add(it.value)
feedsJsonObj.remove(it.key)
feedsJsonObj.entrySet().forEach { entry ->
feedsArray.add(entry.value)
}

// replace original
jsonObject.add("feeds", feedsArray)
}
}
Expand Down

0 comments on commit c2815fe

Please sign in to comment.