diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index 41561af66..57e77d97a 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -124,20 +124,12 @@ public abstract class BaseListInfoFragment extends BaseListF currentWorker = loadResult(forceLoad) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Consumer() { - @Override - public void accept(@NonNull I result) throws Exception { - isLoading.set(false); - currentInfo = result; - currentNextItemsUrl = result.next_streams_url; - handleResult(result); - } - }, new Consumer() { - @Override - public void accept(@NonNull Throwable throwable) throws Exception { - onError(throwable); - } - }); + .subscribe((@NonNull I result) -> { + isLoading.set(false); + currentInfo = result; + currentNextItemsUrl = result.next_streams_url; + handleResult(result); + }, (@NonNull Throwable throwable) -> onError(throwable)); } /** @@ -153,18 +145,12 @@ public abstract class BaseListInfoFragment extends BaseListF currentWorker = loadMoreItemsLogic() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Consumer() { - @Override - public void accept(@io.reactivex.annotations.NonNull ListExtractor.NextItemsResult nextItemsResult) throws Exception { - isLoading.set(false); - handleNextItems(nextItemsResult); - } - }, new Consumer() { - @Override - public void accept(@io.reactivex.annotations.NonNull Throwable throwable) throws Exception { - isLoading.set(false); - onError(throwable); - } + .subscribe((@io.reactivex.annotations.NonNull ListExtractor.NextItemsResult nextItemsResult) -> { + isLoading.set(false); + handleNextItems(nextItemsResult); + }, (@io.reactivex.annotations.NonNull Throwable throwable) -> { + isLoading.set(false); + onError(throwable); }); }