mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-11-05 09:43:00 +00:00
handling error while loading comments
This commit is contained in:
@@ -997,7 +997,6 @@ public class VideoDetailFragment
|
||||
protected void prepareAndLoadInfo() {
|
||||
parallaxScrollRootView.smoothScrollTo(0, 0);
|
||||
pushToStack(serviceId, url, name);
|
||||
//clearComments();
|
||||
startLoading(false);
|
||||
}
|
||||
|
||||
@@ -1027,6 +1026,7 @@ public class VideoDetailFragment
|
||||
|
||||
private void loadComments(boolean forceLoad) {
|
||||
if(isCommentsSupported && showComments){
|
||||
clearComments();
|
||||
commentsInfo = null;
|
||||
if (commentsDisposable != null) commentsDisposable.dispose();
|
||||
|
||||
@@ -1038,7 +1038,7 @@ public class VideoDetailFragment
|
||||
showCommentsWithAnimation(120, 0,0);
|
||||
initComments(commentsInfo);
|
||||
}, (@NonNull Throwable throwable) -> {
|
||||
onError(throwable);
|
||||
onCommentsError(throwable);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1495,4 +1495,8 @@ public class VideoDetailFragment
|
||||
|
||||
showError(getString(R.string.blocked_by_gema), false, R.drawable.gruese_die_gema);
|
||||
}
|
||||
|
||||
public void onCommentsError(Throwable exception) {
|
||||
showSnackBarError(exception, UserAction.REQUESTED_COMMENTS, NewPipe.getNameOfService(serviceId), url, R.string.error_unable_to_load_comments);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user