Browse Source

handling dm attachments

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
388f9216b3
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 16
      app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

16
app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

@ -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);
if (viewModel.hasPk()) {
binding.likesCount.setVisibility(View.VISIBLE);
binding.commentsCount.setVisibility(View.VISIBLE);
binding.date.setVisibility(View.VISIBLE);
binding.captionParent.setVisibility(View.VISIBLE);
binding.captionToggle.setVisibility(View.VISIBLE);
binding.download.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);
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);
}

Loading…
Cancel
Save