mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-26 00:27:30 +00:00
once again fix null guards in feed
This commit is contained in:
parent
87660b4d3b
commit
255c3c84b4
@ -109,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 == null || media.isInjected() || (media.getMediaType() == null && media.getEndOfFeedDemarcator() == 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();
|
||||||
@ -128,6 +127,7 @@ public class FeedService extends BaseService {
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (media == null || media.isInjected() || media.getMediaType() == null) continue;
|
||||||
allPosts.add(media);
|
allPosts.add(media);
|
||||||
}
|
}
|
||||||
return new PostsFetchResponse(allPosts, moreAvailable, nextMaxId);
|
return new PostsFetchResponse(allPosts, moreAvailable, nextMaxId);
|
||||||
|
Loading…
Reference in New Issue
Block a user