mirror of
https://github.com/KokaKiwi/BarInsta
synced 2025-12-02 18:36:30 +00:00
restore slider position on resume
This commit is contained in:
parent
10447cd633
commit
bf1a05a38c
1 changed files with 2 additions and 1 deletions
|
|
@ -294,7 +294,7 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
|
|||
return;
|
||||
}
|
||||
final Media media = (Media) feedModelSerializable;
|
||||
if (media.getMediaType() == MediaItemType.MEDIA_TYPE_SLIDER) {
|
||||
if (media.getMediaType() == MediaItemType.MEDIA_TYPE_SLIDER && sliderPosition == -1) {
|
||||
sliderPosition = arguments.getInt(ARG_SLIDER_POSITION, 0);
|
||||
}
|
||||
viewModel.setMedia(media);
|
||||
|
|
@ -1039,6 +1039,7 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
|
|||
final String text = "1/" + carouselMedia.size();
|
||||
binding.mediaCounter.setText(text);
|
||||
sliderItemsAdapter.submitList(media.getCarouselMedia());
|
||||
sliderParent.setCurrentItem(sliderPosition);
|
||||
}
|
||||
|
||||
private void pauseSliderPlayer() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue