From d7590e543f172e215ec13c1556b4edda485beb4d Mon Sep 17 00:00:00 2001 From: Javi Rueda Date: Mon, 3 May 2021 18:52:29 +0200 Subject: [PATCH] Fix crash for anonymous content or without tags --- .../java/io/lbry/browser/ui/findcontent/FileViewFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index 5c7fbfd2..dcf3627a 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -1523,7 +1523,7 @@ public class FileViewFragment extends BaseFragment implements Helper.setViewVisibility(layoutLoadingState, View.GONE); Helper.setViewVisibility(layoutNothingAtLocation, View.GONE); - if (claim.getTags().contains("disable-support") || claim.getSigningChannel().getTags().contains("disable-support")) + if ((claim.getTags() != null && claim.getTags().contains("disable-support")) || (claim.getSigningChannel() != null && claim.getSigningChannel().getTags().contains("disable-support"))) Helper.setViewVisibility(tipButton, View.GONE); else Helper.setViewVisibility(tipButton, View.VISIBLE); @@ -1713,7 +1713,7 @@ public class FileViewFragment extends BaseFragment implements View commentsDisabledText = root.findViewById(R.id.file_view_disabled_comments); View commentForm = root.findViewById(R.id.container_comment_form); RecyclerView commentsList = root.findViewById(R.id.file_view_comments_list); - if (claim.getTags().contains("disable-comments") || claim.getSigningChannel().getTags().contains("disable-comments")) { + if ((claim.getTags() != null && (claim.getTags().contains("disable-comments")) || (claim.getSigningChannel() != null && claim.getSigningChannel().getTags().contains("disable-comments")))) { Helper.setViewVisibility(commentsDisabledText, View.VISIBLE); Helper.setViewVisibility(commentForm, View.GONE); Helper.setViewVisibility(commentsList, View.GONE);