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

remove slider video view count

those don't exist anymore
This commit is contained in:
Austin Huang 2021-07-03 14:14:22 -04:00
parent 2cc15dedbb
commit d4b6ca23cd
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -116,7 +116,7 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
private DialogPostViewBinding binding;
private Context context;
private boolean detailsVisible = true;
private boolean video;
// private boolean video;
private VideoPlayerViewHelper videoPlayerViewHelper;
private SliderItemsAdapter sliderItemsAdapter;
private int sliderPosition = -1;
@ -996,30 +996,13 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
final String text = (position + 1) + "/" + size;
binding.mediaCounter.setText(text);
final Media childMedia = media.getCarouselMedia().get(position);
// final View view = binding.sliderParent.getChildAt(0);
// if (prevPosition != -1) {
// if (view instanceof RecyclerView) {
// final RecyclerView.ViewHolder viewHolder = ((RecyclerView) view).findViewHolderForAdapterPosition(prevPosition);
// if (viewHolder instanceof SliderVideoViewHolder) {
// ((SliderVideoViewHolder) viewHolder).removeCallbacks();
// }
// }
// }
video = false;
if (childMedia.getType() == MediaItemType.MEDIA_TYPE_VIDEO) {
// if (view instanceof RecyclerView) {
// final RecyclerView.ViewHolder viewHolder = ((RecyclerView) view).findViewHolderForAdapterPosition(position);
// if (viewHolder instanceof SliderVideoViewHolder) {
// ((SliderVideoViewHolder) viewHolder).resetPlayerTimeline();
// }
// }
// enablePlayerControls(true);
video = true;
viewModel.setViewCount(childMedia.getViewCount());
return;
}
viewModel.setViewCount(null);
// enablePlayerControls(false);
// video = false;
// if (childMedia.getType() == MediaItemType.MEDIA_TYPE_VIDEO) {
// video = true;
// viewModel.setViewCount(childMedia.getViewCount());
// return;
// }
// viewModel.setViewCount(null);
}
private void pausePlayerAtPosition(final int position, final RecyclerView view) {
@ -1058,7 +1041,7 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
}
private void setupVideo() {
video = true;
// video = true;
final Media media = viewModel.getMedia();
binding.mediaCounter.setVisibility(View.GONE);
final Context context = getContext();
@ -1396,7 +1379,8 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
bottom.like.setVisibility(View.VISIBLE);
bottom.save.setVisibility(View.VISIBLE);
}
if (video) {
// if (video) {
if (media.getType() == MediaItemType.MEDIA_TYPE_VIDEO) {
// binding.playerControlsToggle.setVisibility(View.VISIBLE);
bottom.viewsCount.setVisibility(View.VISIBLE);
}