mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
Fix live stories
This commit is contained in:
parent
4b055c8050
commit
02a1a4a5f5
@ -1150,8 +1150,8 @@ public final class ResponseBodyUtils {
|
|||||||
data.getString("cover_frame_url"),
|
data.getString("cover_frame_url"),
|
||||||
MediaItemType.MEDIA_TYPE_LIVE,
|
MediaItemType.MEDIA_TYPE_LIVE,
|
||||||
data.optLong("published_time", 0),
|
data.optLong("published_time", 0),
|
||||||
data.getJSONObject("user").getString("username"),
|
data.getJSONObject("broadcast_owner").getString("username"),
|
||||||
data.getJSONObject("user").getLong("pk"),
|
data.getJSONObject("broadcast_owner").getLong("pk"),
|
||||||
false);
|
false);
|
||||||
model.setVideoUrl(data.getString("dash_playback_url"));
|
model.setVideoUrl(data.getString("dash_playback_url"));
|
||||||
return model;
|
return model;
|
||||||
|
@ -205,11 +205,10 @@ public class StoriesService extends BaseService {
|
|||||||
);
|
);
|
||||||
final String id = node.getString("id");
|
final String id = node.getString("id");
|
||||||
final long timestamp = node.getLong("published_time");
|
final long timestamp = node.getLong("published_time");
|
||||||
final JSONObject itemJson = node.has("items") ? node.getJSONArray("items").getJSONObject(0) : null;
|
// final JSONObject itemJson = node.has("items") ? node.getJSONArray("items").getJSONObject(0) : null;
|
||||||
StoryModel firstStoryModel = null;
|
final StoryModel firstStoryModel = ResponseBodyUtils.parseBroadcastItem(node);
|
||||||
if (itemJson != null) {
|
// if (itemJson != null) {
|
||||||
firstStoryModel = ResponseBodyUtils.parseBroadcastItem(itemJson);
|
// }
|
||||||
}
|
|
||||||
feedStoryModels.add(new FeedStoryModel(id, user, false, timestamp, firstStoryModel, 1, true, false));
|
feedStoryModels.add(new FeedStoryModel(id, user, false, timestamp, firstStoryModel, 1, true, false));
|
||||||
}
|
}
|
||||||
callback.onSuccess(sort(feedStoryModels));
|
callback.onSuccess(sort(feedStoryModels));
|
||||||
|
Loading…
Reference in New Issue
Block a user