From 387a56faf58ed6c87ebc46f8dde58e60b7154d23 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Fri, 13 Nov 2020 17:29:17 -0500 Subject: [PATCH] allow anon viewing of comments --- .../awais/instagrabber/fragments/PostViewV2Fragment.java | 6 +----- app/src/main/res/layout/fragment_comments.xml | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java b/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java index 1869be16..2b7b6e7c 100644 --- a/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java @@ -421,10 +421,6 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment { } private void setupComment() { - if (!isLoggedIn) { - binding.comment.setVisibility(View.GONE); - return; - } binding.comment.setOnClickListener(v -> { final NavController navController = getNavController(); if (navController == null) return; @@ -1129,8 +1125,8 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment { binding.captionToggle.setVisibility(View.VISIBLE); binding.download.setVisibility(View.VISIBLE); binding.share.setVisibility(View.VISIBLE); + binding.comment.setVisibility(View.VISIBLE); if (isLoggedIn) { - binding.comment.setVisibility(View.VISIBLE); binding.like.setVisibility(View.VISIBLE); binding.save.setVisibility(View.VISIBLE); } diff --git a/app/src/main/res/layout/fragment_comments.xml b/app/src/main/res/layout/fragment_comments.xml index 4266b9f7..f423bb70 100644 --- a/app/src/main/res/layout/fragment_comments.xml +++ b/app/src/main/res/layout/fragment_comments.xml @@ -26,6 +26,7 @@ android:layout_height="wrap_content" android:layout_margin="4dp" android:hint="@string/comment_hint" + android:visibility="gone" app:counterEnabled="true" app:counterMaxLength="2200" app:endIconDrawable="@drawable/ic_send_24"