1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 05:16:58 +00:00

handling dm attachments

This commit is contained in:
Austin Huang 2021-01-12 12:39:00 -05:00
parent 3e84786c46
commit 388f9216b3
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -577,14 +577,12 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
}
private void setupLike() {
/*
final boolean likableMedia = viewModel.hasPk() && viewModel.getMedia().isCommentLikesEnabled();
final boolean likableMedia = viewModel.hasPk() /*&& viewModel.getMedia().isCommentLikesEnabled()*/;
if (!likableMedia) {
binding.like.setVisibility(View.GONE);
binding.likesCount.setVisibility(View.GONE);
return;
}
*/
if (!viewModel.isLoggedIn()) {
binding.like.setVisibility(View.GONE);
return;
@ -1404,20 +1402,24 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
if (media.getLocation() != null) {
binding.location.setVisibility(View.VISIBLE);
}
binding.captionParent.setVisibility(View.VISIBLE);
binding.bottomBg.setVisibility(View.VISIBLE);
binding.likesCount.setVisibility(View.VISIBLE);
binding.commentsCount.setVisibility(View.VISIBLE);
binding.date.setVisibility(View.VISIBLE);
binding.captionToggle.setVisibility(View.VISIBLE);
if (viewModel.hasPk()) {
binding.likesCount.setVisibility(View.VISIBLE);
binding.date.setVisibility(View.VISIBLE);
binding.captionParent.setVisibility(View.VISIBLE);
binding.captionToggle.setVisibility(View.VISIBLE);
binding.share.setVisibility(View.VISIBLE);
}
if (viewModel.hasPk() && !viewModel.getMedia().isCommentsDisabled()) {
binding.comment.setVisibility(View.VISIBLE);
binding.commentsCount.setVisibility(View.VISIBLE);
}
binding.download.setVisibility(View.VISIBLE);
binding.share.setVisibility(View.VISIBLE);
binding.comment.setVisibility(View.VISIBLE);
final List<Integer> options = viewModel.getOptions().getValue();
if (options != null && !options.isEmpty()) {
binding.options.setVisibility(View.VISIBLE);
}
if (viewModel.isLoggedIn()) {
if (viewModel.isLoggedIn() && viewModel.hasPk()) {
binding.like.setVisibility(View.VISIBLE);
binding.save.setVisibility(View.VISIBLE);
}