Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrzu Ionut <orzu.ionut@gmail.com>2021-11-09 17:07:36 +0300
committerOrzu Ionut <orzu.ionut@gmail.com>2021-11-09 17:59:16 +0300
commit33c1c5c91b11f3401283274579747efee51013e3 (patch)
tree0f8a5f12b5c8d3d326dfb68c34716231bc0c7b9e /apps/files_trashbin
parent81b60c14c985b0a46fd31733db2add9efd7bedba (diff)
Show most recently deleted files first in trash can
Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
Diffstat (limited to 'apps/files_trashbin')
-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 7f4be89efdc..cc73ce09ccb 100644
--- a/apps/files_trashbin/lib/Trash/TrashManager.php
+++ b/apps/files_trashbin/lib/Trash/TrashManager.php
@@ -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;
}
diff --git a/apps/files_trashbin/src/filelist.js b/apps/files_trashbin/src/filelist.js
index 9f66ee56cc0..5dfb7a0068f 100644
--- a/apps/files_trashbin/src/filelist.js
+++ b/apps/files_trashbin/src/filelist.js
@@ -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