summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorOrzu Ionut <orzu.ionut@gmail.com>2021-11-09 16:07:36 +0200
committerszaimen (Rebase PR Action) <szaimen@e.mail.de>2021-11-15 22:47:17 +0000
commitca38388109b12711067508f6d85eea02c06ef6b9 (patch)
tree2f48745dde37f55d47d4a45d1a93b3d1ec42f3a5 /apps
parent80a804aa41853e9123bf69cfab66efd98bd07df4 (diff)
downloadnextcloud-server-ca38388109b12711067508f6d85eea02c06ef6b9.tar.gz
nextcloud-server-ca38388109b12711067508f6d85eea02c06ef6b9.zip
Show most recently deleted files first in trash can
Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/Trash/TrashManager.php2
-rw-r--r--apps/files_trashbin/src/filelist.js2
2 files changed, 2 insertions, 2 deletions
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