You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to change the view size of media while they are loading in the background.
As a result the medias can be temporary shown in the wrong order.
Steps to reproduce the issue
Initial state: main activity showing the listing of medias by folder is shown and view size is set to medium
while the medias are loading, change the view size to small. The application takes currently shown medias and immediately redraws them with the new view size. However, it already accounts for the changed grouping option and takes the old medias (ordered by folder) and groups them by date. As a result they are very likely to be in the wrong order.
The background task created in step 1. finishes and redraws the medias in the correct order.
The wrong execution can be easily triggered after adding Thread.sleep to simulate slow database before Utils.loadMedia(false) call.
Possible Fix
We can make the two events (changing the view size and loading) commutative by always resorting the current medias when the view size changes.
The text was updated successfully, but these errors were encountered:
Description
It is possible to change the view size of media while they are loading in the background.
As a result the medias can be temporary shown in the wrong order.
Steps to reproduce the issue
Initial state: main activity showing the listing of medias by folder is shown and view size is set to medium
The wrong execution can be easily triggered after adding Thread.sleep to simulate slow database before Utils.loadMedia(false) call.
Possible Fix
We can make the two events (changing the view size and loading) commutative by always resorting the current medias when the view size changes.
The text was updated successfully, but these errors were encountered: