File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
app/src/main/java/com/owncloud/android/ui/adapter Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -444,25 +444,17 @@ private void notifyItemRange(List<File> updatedList) {
444444 });
445445 }
446446
447- private final Object filesLock = new Object ();
448-
449447 @ SuppressLint ("NotifyDataSetChanged" )
450448 public void setSortOrder (FileSortOrder sortOrder ) {
451449 localFileListFragmentInterface .setLoading (true );
452450 singleThreadExecutor .execute (() -> {
453- List <File > sortedCopy ;
454- synchronized (filesLock ) {
455- sortedCopy = new ArrayList <>(mFiles );
456- }
457-
451+ List <File > sortedCopy = new ArrayList <>(mFiles );
458452 sortedCopy = sortOrder .sortLocalFiles (sortedCopy );
459453
460- List <File > finalSortedCopy = sortedCopy ;
454+ final List <File > finalSortedCopy = sortedCopy ;
461455 new Handler (Looper .getMainLooper ()).post (() -> {
462- synchronized (filesLock ) {
463- mFiles = finalSortedCopy ;
464- mFilesAll = new ArrayList <>(finalSortedCopy );
465- }
456+ mFiles = finalSortedCopy ;
457+ mFilesAll = new ArrayList <>(finalSortedCopy );
466458 notifyDataSetChanged ();
467459 localFileListFragmentInterface .setLoading (false );
468460 });
You can’t perform that action at this time.
0 commit comments