mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
[dir view] improved 'sort by size' (#4422)
This commit is contained in:
@@ -939,8 +939,7 @@ export const Utils = {
|
||||
case 'size-asc':
|
||||
comparator = function(a, b) {
|
||||
if (a.type == 'dir' && b.type == 'dir') {
|
||||
let result = _this.compareTwoWord(a.name, b.name);
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
return a.size_original < b.size_original ? -1 : 1;
|
||||
};
|
||||
@@ -948,8 +947,7 @@ export const Utils = {
|
||||
case 'size-desc':
|
||||
comparator = function(a, b) {
|
||||
if (a.type == 'dir' && b.type == 'dir') {
|
||||
let result = _this.compareTwoWord(a.name, b.name);
|
||||
return -result;
|
||||
return 0;
|
||||
}
|
||||
return a.size_original < b.size_original ? 1 : -1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user