Fix comment layout

This commit is contained in:
Thomas 2020-10-15 19:07:58 +02:00
parent 785b4949e6
commit d800d2b10c
1 changed files with 9 additions and 4 deletions

View File

@ -209,6 +209,10 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
}
if( !Helper.isLoggedIn(PeertubeActivity.this) || sepiaSearch) {
binding.writeCommentContainerReply.setVisibility(View.GONE);
binding.writeCommentContainer.setVisibility(View.GONE);
}
playInMinimized = sharedpreferences.getBoolean(getString(R.string.set_video_minimize_choice), true);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N
&& !getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)) {
@ -504,7 +508,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
PlaylistsVM viewModel = new ViewModelProvider(this).get(PlaylistsVM.class);
viewModel.videoExists(videoIds).observe(this, this::manageVIewPlaylist);
if( !Helper.isLoggedIn(PeertubeActivity.this)) {
if( !Helper.isLoggedIn(PeertubeActivity.this) || sepiaSearch) {
binding.writeCommentContainer.setVisibility(View.GONE);
binding.writeCommentContainerReply.setVisibility(View.GONE);
}
@ -533,11 +537,12 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
if (peertube.isCommentsEnabled()) {
CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class);
commentViewModel.getThread(sepiaSearch?peertubeInstance:null, videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
binding.writeCommentContainer.setVisibility(View.VISIBLE);
binding.writeCommentContainerReply.setVisibility(View.GONE);
binding.writeCommentContainer.setVisibility(View.GONE);
} else {
binding.writeCommentContainerReply.setVisibility(View.GONE);
binding.writeCommentContainer.setVisibility(View.GONE);
binding.noActionText.setText(getString(R.string.comment_no_allowed_peertube));
binding.noAction.setVisibility(View.VISIBLE);
binding.writeCommentContainer.setVisibility(View.GONE);