mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-26 08:37:29 +00:00
handling dm attachments
This commit is contained in:
parent
3e84786c46
commit
388f9216b3
@ -577,14 +577,12 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setupLike() {
|
private void setupLike() {
|
||||||
/*
|
final boolean likableMedia = viewModel.hasPk() /*&& viewModel.getMedia().isCommentLikesEnabled()*/;
|
||||||
final boolean likableMedia = viewModel.hasPk() && viewModel.getMedia().isCommentLikesEnabled();
|
|
||||||
if (!likableMedia) {
|
if (!likableMedia) {
|
||||||
binding.like.setVisibility(View.GONE);
|
binding.like.setVisibility(View.GONE);
|
||||||
binding.likesCount.setVisibility(View.GONE);
|
binding.likesCount.setVisibility(View.GONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if (!viewModel.isLoggedIn()) {
|
if (!viewModel.isLoggedIn()) {
|
||||||
binding.like.setVisibility(View.GONE);
|
binding.like.setVisibility(View.GONE);
|
||||||
return;
|
return;
|
||||||
@ -1404,20 +1402,24 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
|
|||||||
if (media.getLocation() != null) {
|
if (media.getLocation() != null) {
|
||||||
binding.location.setVisibility(View.VISIBLE);
|
binding.location.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
binding.captionParent.setVisibility(View.VISIBLE);
|
|
||||||
binding.bottomBg.setVisibility(View.VISIBLE);
|
binding.bottomBg.setVisibility(View.VISIBLE);
|
||||||
binding.likesCount.setVisibility(View.VISIBLE);
|
if (viewModel.hasPk()) {
|
||||||
binding.commentsCount.setVisibility(View.VISIBLE);
|
binding.likesCount.setVisibility(View.VISIBLE);
|
||||||
binding.date.setVisibility(View.VISIBLE);
|
binding.date.setVisibility(View.VISIBLE);
|
||||||
binding.captionToggle.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.download.setVisibility(View.VISIBLE);
|
||||||
binding.share.setVisibility(View.VISIBLE);
|
|
||||||
binding.comment.setVisibility(View.VISIBLE);
|
|
||||||
final List<Integer> options = viewModel.getOptions().getValue();
|
final List<Integer> options = viewModel.getOptions().getValue();
|
||||||
if (options != null && !options.isEmpty()) {
|
if (options != null && !options.isEmpty()) {
|
||||||
binding.options.setVisibility(View.VISIBLE);
|
binding.options.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if (viewModel.isLoggedIn()) {
|
if (viewModel.isLoggedIn() && viewModel.hasPk()) {
|
||||||
binding.like.setVisibility(View.VISIBLE);
|
binding.like.setVisibility(View.VISIBLE);
|
||||||
binding.save.setVisibility(View.VISIBLE);
|
binding.save.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user