From dde8fd37e3e580e23c274ba4db30def440c68905 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sat, 22 May 2021 20:27:32 +0900 Subject: [PATCH] Fix stories parsing --- app/src/main/java/awais/instagrabber/models/FeedStoryModel.kt | 2 +- .../java/awais/instagrabber/webservices/StoriesService.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/models/FeedStoryModel.kt b/app/src/main/java/awais/instagrabber/models/FeedStoryModel.kt index 9c0e8371..2897f3cd 100644 --- a/app/src/main/java/awais/instagrabber/models/FeedStoryModel.kt +++ b/app/src/main/java/awais/instagrabber/models/FeedStoryModel.kt @@ -10,7 +10,7 @@ data class FeedStoryModel( val profileModel: User, var isFullyRead: Boolean, val timestamp: Long, - val firstStoryModel: StoryModel, + val firstStoryModel: StoryModel?, val mediaCount: Int, val isLive: Boolean, val isBestie: Boolean diff --git a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java index 9b6a2f49..2b0fe81c 100644 --- a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java +++ b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java @@ -161,7 +161,9 @@ public class StoriesService extends BaseService { node.getInt("media_count"), false, node.optBoolean("has_besties_media"))); - } catch (Exception e) {} // to cover promotional reels with non-long user pk's + } catch (Exception e) { + Log.e(TAG, "parseStoriesBody: ", e); + } // to cover promotional reels with non-long user pk's } final JSONArray broadcasts = new JSONObject(body).getJSONArray("broadcasts"); for (int i = 0; i < broadcasts.length(); ++i) {