-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(files): Ensure folders and favorites are sorted first regardless of sorting mode #41519
Conversation
d4c5aa2
to
ae711a0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
@nickvergessen resolved - waiting for reviews. |
ae711a0
to
96dd30a
Compare
this.isAscSorting ? 'asc' : 'desc', | ||
this.isAscSorting ? 'asc' : 'desc', | ||
] | ||
return [identifiers, orders] as const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as const
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes otherwise the type would be (v => bool | string)[]
using const
the type is [v => bool, string]
making it obvious that this only returns an array with exactly two elements. So that we can deconstruct it for orderBy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…or sorting order Also fixes `mtime` being wrong sorted, as high mtime means recently edited -> lower Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
96dd30a
to
1be7eb1
Compare
/compile amend/ |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Summary
Add fixed sorting mode for "folder before files" and "favorites before other" - meaning those should if configured sorted before even for descending.
Checklist