diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java index d41b9e8e3b5..c51c7eaff86 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentsFragment.java @@ -25,7 +25,7 @@ public class CommentsFragment extends BaseListInfoFragment { private final CompositeDisposable disposables = new CompositeDisposable(); - private TextView commentsDisabledView; + private TextView emptyStateDesc; public static CommentsFragment getInstance(final int serviceId, final String url, final String name) { @@ -42,7 +42,7 @@ public CommentsFragment() { protected void initViews(final View rootView, final Bundle savedInstanceState) { super.initViews(rootView, savedInstanceState); - commentsDisabledView = rootView.findViewById(R.id.comments_disabled); + emptyStateDesc = rootView.findViewById(R.id.empty_state_desc); } /*////////////////////////////////////////////////////////////////////////// @@ -84,8 +84,10 @@ protected Single loadResult(final boolean forceLoad) { public void handleResult(@NonNull final CommentsInfo result) { super.handleResult(result); - commentsDisabledView.setVisibility( - result.isCommentsDisabled() ? View.VISIBLE : View.GONE); + emptyStateDesc.setText( + result.isCommentsDisabled() + ? R.string.comments_are_disabled + : R.string.no_comments); ViewUtils.slideUp(requireView(), 120, 150, 0.06f); disposables.clear(); diff --git a/app/src/main/res/layout/fragment_comments.xml b/app/src/main/res/layout/fragment_comments.xml index 9de932b20b6..b8e536c7379 100644 --- a/app/src/main/res/layout/fragment_comments.xml +++ b/app/src/main/res/layout/fragment_comments.xml @@ -41,6 +41,7 @@ tools:ignore="HardcodedText,UnusedAttribute" /> - -