Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Show most recently deleted files first in trash can
Signed-off-by: Orzu Ionut <[email protected]>
  • Loading branch information
orzuionut authored and szaimen committed Nov 10, 2021
commit 3d6902103a4624007453a6369e653f9a4dd93bd9
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Trash/TrashManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function listTrashRoot(IUser $user): array {
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;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/src/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down