Sort deleted files by most recently deleted first

Signed-off-by: Jan C. Borchardt <hey@jancborchardt.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Jan C. Borchardt 2020-10-07 17:18:27 +02:00 committed by Morris Jobke
parent 3b82c6cc84
commit 0f2f857dc3
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
4 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -71,7 +71,9 @@
var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments)
this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this))
this.setSort('mtime', 'desc')
// Sort by most recently deleted first
this.setSort('mtime', 'asc')
/**
* Override crumb making to add "Deleted Files" entry
* and convert files with ".d" extensions to a more

View File

@ -129,7 +129,7 @@ describe('OCA.Trashbin.FileList tests', function () {
describe('Initialization', function () {
it('Sorts by mtime by default', function () {
expect(fileList._sort).toEqual('mtime');
expect(fileList._sortDirection).toEqual('desc');
expect(fileList._sortDirection).toEqual('asc');
});
it('Always returns read and delete permission', function () {
expect(fileList.getDirectoryPermissions()).toEqual(OC.PERMISSION_READ | OC.PERMISSION_DELETE);