From f6ddd99449c0ed5b0ec1f1ca84dfb5ed3d4dd2e5 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 14 Nov 2020 15:09:52 +0100 Subject: [PATCH] Last fixes --- .../main/java/app/fedilab/fedilabtube/PeertubeActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java b/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java index 7b97d56..34bb242 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java @@ -743,7 +743,11 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd }); if (peertube.isCommentsEnabled()) { - binding.postCommentButton.setVisibility(View.VISIBLE); + if (Helper.isLoggedIn(PeertubeActivity.this)) { + binding.postCommentButton.setVisibility(View.VISIBLE); + } else { + binding.postCommentButton.setVisibility(View.GONE); + } CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class); commentViewModel.getThread(sepiaSearch ? peertubeInstance : null, videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment); if (Helper.isLoggedIn(PeertubeActivity.this) && !sepiaSearch) {