|
@ -56,7 +56,6 @@ public class FeedService extends BaseService { |
|
|
form.put("device_id", UUID.randomUUID().toString()); |
|
|
form.put("device_id", UUID.randomUUID().toString()); |
|
|
form.put("client_session_id", UUID.randomUUID().toString()); |
|
|
form.put("client_session_id", UUID.randomUUID().toString()); |
|
|
form.put("is_prefetch", "0"); |
|
|
form.put("is_prefetch", "0"); |
|
|
form.put("timezone_offset", String.valueOf(TimeZone.getDefault().getRawOffset() / 1000)); |
|
|
|
|
|
if (!TextUtils.isEmpty(cursor)) { |
|
|
if (!TextUtils.isEmpty(cursor)) { |
|
|
form.put("max_id", cursor); |
|
|
form.put("max_id", cursor); |
|
|
form.put("reason", "pagination"); |
|
|
form.put("reason", "pagination"); |
|
@ -110,7 +109,6 @@ public class FeedService extends BaseService { |
|
|
final List<Media> allPosts = new ArrayList<>(); |
|
|
final List<Media> allPosts = new ArrayList<>(); |
|
|
final List<Media> items = feedFetchResponse.getItems(); |
|
|
final List<Media> items = feedFetchResponse.getItems(); |
|
|
for (final Media media : items) { |
|
|
for (final Media media : items) { |
|
|
if (media.isInjected() || media.getMediaType() == null) continue; |
|
|
|
|
|
if (needNewMaxId && media.getEndOfFeedDemarcator() != null) { |
|
|
if (needNewMaxId && media.getEndOfFeedDemarcator() != null) { |
|
|
final EndOfFeedDemarcator endOfFeedDemarcator = media.getEndOfFeedDemarcator(); |
|
|
final EndOfFeedDemarcator endOfFeedDemarcator = media.getEndOfFeedDemarcator(); |
|
|
final EndOfFeedGroupSet groupSet = endOfFeedDemarcator.getGroupSet(); |
|
|
final EndOfFeedGroupSet groupSet = endOfFeedDemarcator.getGroupSet(); |
|
@ -129,6 +127,7 @@ public class FeedService extends BaseService { |
|
|
} |
|
|
} |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
if (media.isInjected() || media.getMediaType() == null) continue; |
|
|
allPosts.add(media); |
|
|
allPosts.add(media); |
|
|
} |
|
|
} |
|
|
return new PostsFetchResponse(allPosts, moreAvailable, nextMaxId); |
|
|
return new PostsFetchResponse(allPosts, moreAvailable, nextMaxId); |
|
|