diff --git a/apps/files_trashbin/lib/Trash/TrashManager.php b/apps/files_trashbin/lib/Trash/TrashManager.php index 8d75ac21658..d5b5e3ffad9 100644 --- a/apps/files_trashbin/lib/Trash/TrashManager.php +++ b/apps/files_trashbin/lib/Trash/TrashManager.php @@ -48,7 +48,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 4e7f0817802..b9644a7e831 100644 --- a/apps/files_trashbin/src/filelist.js +++ b/apps/files_trashbin/src/filelist.js @@ -72,7 +72,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