Show most recently deleted files first in trash can

Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
This commit is contained in:
Orzu Ionut 2021-11-09 16:07:36 +02:00 committed by szaimen
parent c43c2409a6
commit 3d6902103a
2 changed files with 2 additions and 2 deletions

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;
}

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