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