Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order is not respected when selecting multiple video #488

Closed
tony-halloapp opened this issue May 19, 2020 · 11 comments
Closed

Order is not respected when selecting multiple video #488

tony-halloapp opened this issue May 19, 2020 · 11 comments

Comments

@tony-halloapp
Copy link

If multiple selection is enabled and multiple videos are selected (ie. 10 videos) the order in which they are selected are not respected in didFinishPicking

Note: The ordering for images work fine

@Ludotrico
Copy link

I agree, I wonder why this is the case?

@heitara
Copy link
Contributor

heitara commented Jul 5, 2020

I’ll investigate this and get back to you. Could be something minor.

@Ludotrico
Copy link

@heitara @mendesbarreto @s4cha Any ideas? Multiple selection that incorporates images and videos scrambles the order.

@heitara
Copy link
Contributor

heitara commented Aug 4, 2020

@Ludotrico could you share exact steps. For example: open example app. Pick 5 images and 5 videos. The order is 2v,2i,3i... expected order is 1i,2i,3i...

@tony-halloapp
Copy link
Author

If there are 5 images and 5 videos and the picked order is
1v, 2v, 3v, 4v, 5v, 1i, 2i, 3i, 4i, 5i
the expected order should be the same but it almost never end up that way, especially if the videoes are large

guessing that it could be when a large video is selected it takes time to either transpose the video or just put it into the array so if the user picks an image or smaller video right after, that item gets done first and gets put into the array earlier

@heitara
Copy link
Contributor

heitara commented Aug 4, 2020

I found the problem. @tony-halloapp @Ludotrico could you guys check the following version using the sample project? #533
You can find a working version here - https://github.com/heitara/YPImagePicker/tree/feature/issue-488

@Ludotrico
Copy link

@heitara thank you for investigating! I just pasted your changes in my project that is currently running the up to date version of the master. Unfortunately the problem persists. Images seem to always be placed before videos, disregarding order.

https://youtu.be/LonRlghD8-w

@tony-halloapp same on your end?

@NikKovIos
Copy link
Collaborator

@heitara Does #533 fix that?

@heitara
Copy link
Contributor

heitara commented Aug 25, 2020

@NikKovIos exactly. The sort function keeps the selection order "stable".

@NikKovIos
Copy link
Collaborator

@heitara so 488 mr i can close?

@heitara
Copy link
Contributor

heitara commented Aug 25, 2020

Yes, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants