mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-30 08:00:24 +00:00
fix crash on FireTV
This commit is contained in:
parent
34c98da704
commit
a070880748
1 changed files with 7 additions and 4 deletions
|
@ -130,13 +130,16 @@ public class ConferencesBrowseFragment extends BrowseFragment {
|
|||
.subscribe(mediaApiService -> {
|
||||
Iterator<WatchlistItem> watchlistItems = WatchlistItem.findAll(WatchlistItem.class);
|
||||
watchListAdapter.clear();
|
||||
watchlistItems.forEachRemaining(watchlistItem -> {
|
||||
mediaApiService.getEvent(watchlistItem.getEventId())
|
||||
while (watchlistItems.hasNext()){
|
||||
WatchlistItem watchlistItem = watchlistItems.next();
|
||||
mediaApiService.getEvent(watchlistItem.getEventId())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(event -> watchListAdapter.add(event));
|
||||
});
|
||||
}
|
||||
if(watchListAdapter.size() == 0){
|
||||
// TODO hide empty watchlist
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue