diff --git a/apps/files_trashbin/lib/Trash/TrashManager.php b/apps/files_trashbin/lib/Trash/TrashManager.php index 7f4be89efdc..cc73ce09ccb 100644 --- a/apps/files_trashbin/lib/Trash/TrashManager.php +++ b/apps/files_trashbin/lib/Trash/TrashManager.php @@ -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; } diff --git a/apps/files_trashbin/src/filelist.js b/apps/files_trashbin/src/filelist.js index 9bc8b459038..5386c69bdd6 100644 --- a/apps/files_trashbin/src/filelist.js +++ b/apps/files_trashbin/src/filelist.js @@ -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