improved date sort with secondary title sort
This commit is contained in:
parent
3baaaa5877
commit
dd325eea04
1 changed files with 4 additions and 1 deletions
|
@ -89,7 +89,10 @@ class CollectionLens with ChangeNotifier {
|
|||
void _applySort() {
|
||||
switch (sortFactor) {
|
||||
case SortFactor.date:
|
||||
_filteredEntries.sort((a, b) => b.bestDate.compareTo(a.bestDate));
|
||||
_filteredEntries.sort((a, b) {
|
||||
final c = b.bestDate.compareTo(a.bestDate);
|
||||
return c != 0 ? c : compareAsciiUpperCase(a.title, b.title);
|
||||
});
|
||||
break;
|
||||
case SortFactor.size:
|
||||
_filteredEntries.sort((a, b) => b.sizeBytes.compareTo(a.sizeBytes));
|
||||
|
|
Loading…
Reference in a new issue