mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
fix didn't show drives on '/' page
This commit is contained in:
@@ -1178,11 +1178,13 @@ class SelectedItems {
|
||||
}
|
||||
}
|
||||
|
||||
// code from file_manager pkg after edit
|
||||
// edited from [https://github.com/DevsOnFlutter/file_manager/blob/c1bf7f0225b15bcb86eba602c60acd5c4da90dd8/lib/file_manager.dart#L22]
|
||||
List<Entry> _sortList(List<Entry> list, SortBy sortType, bool ascending) {
|
||||
if (sortType == SortBy.Name) {
|
||||
// making list of only folders.
|
||||
final dirs = list.where((element) => element.isDirectory).toList();
|
||||
final dirs = list
|
||||
.where((element) => element.isDirectory || element.isDrive)
|
||||
.toList();
|
||||
// sorting folder list by name.
|
||||
dirs.sort((a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user