Skip to content

Commit 33c1c5c

Browse files
committed
Show most recently deleted files first in trash can
Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
1 parent 81b60c1 commit 33c1c5c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/files_trashbin/lib/Trash/TrashManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function listTrashRoot(IUser $user): array {
4747
return array_merge($items, $backend->listTrashRoot($user));
4848
}, []);
4949
usort($items, function (ITrashItem $a, ITrashItem $b) {
50-
return $a->getDeletedTime() - $b->getDeletedTime();
50+
return $b->getDeletedTime() - $a->getDeletedTime();
5151
});
5252
return $items;
5353
}

apps/files_trashbin/src/filelist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this))
9191

9292
// Sort by most recently deleted first
93-
this.setSort('mtime', 'asc')
93+
this.setSort('mtime', 'desc')
9494

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

0 commit comments

Comments
 (0)