Browse Source

Show most recently deleted files first in trash can

Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
tags/v23.0.0rc1
Orzu Ionut 2 years ago
parent
commit
33c1c5c91b

+ 1
- 1
apps/files_trashbin/lib/Trash/TrashManager.php View File

@@ -47,7 +47,7 @@ class TrashManager implements ITrashManager {
return array_merge($items, $backend->listTrashRoot($user));
}, []);
usort($items, function (ITrashItem $a, ITrashItem $b) {
return $a->getDeletedTime() - $b->getDeletedTime();
return $b->getDeletedTime() - $a->getDeletedTime();
});
return $items;
}

+ 1
- 1
apps/files_trashbin/src/filelist.js View File

@@ -90,7 +90,7 @@
this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this))

// Sort by most recently deleted first
this.setSort('mtime', 'asc')
this.setSort('mtime', 'desc')

/**
* Override crumb making to add "Deleted Files" entry

Loading…
Cancel
Save