Skip to content
Snippets Groups Projects
Commit dd56db52 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent race conditions in content display

parent 501aaad6
No related branches found
No related tags found
No related merge requests found
......@@ -29,11 +29,11 @@ public abstract class SortableAdapter<T extends MediaLibraryItem, VH extends Rec
public void sortBy(int sortby, int direction) {
sMediaComparator.sortBy(sortby, direction);
update(new ArrayList<>(mDataset));
update(new ArrayList<>(peekLast()));
}
public void updateIfSortChanged() {
if (hasSortChanged())
if (!hasPendingUpdates() && hasSortChanged())
update(new ArrayList<>(mDataset));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment