diff --git a/app/build.gradle b/app/build.gradle index e4c1f24c1..0b264d8c6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,7 +55,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.yausername:NewPipeExtractor:c1199c8' + implementation 'com.github.yausername:NewPipeExtractor:fb14196' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 09e9b38d7..1629afadd 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -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); + } } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 23039a4c7..3dbbc29cf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -389,6 +389,7 @@ Warning: Could not import all files. This will override your current setup. Do you want to also import settings? + Could not load comments Kiosk