Browse Source

close #952

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
04ee3883ea
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 8
      app/src/main/java/awais/instagrabber/webservices/NewsService.java

8
app/src/main/java/awais/instagrabber/webservices/NewsService.java

@ -56,9 +56,11 @@ public class NewsService extends BaseService {
callback.onSuccess(null); callback.onSuccess(null);
return; return;
} }
final List<Notification> result = new ArrayList<>();
result.addAll(body.getNewStories());
result.addAll(body.getOldStories());
final List<Notification> result = new ArrayList<Notification>();
final List<Notification> newStories = body.getNewStories();
if (newStories != null) result.addAll(newStories);
final List<Notification> oldStories = body.getOldStories();
if (oldStories != null) result.addAll(oldStories);
callback.onSuccess(result); callback.onSuccess(result);
} }

Loading…
Cancel
Save