Merge pull request #52652 from nextcloud/backport/52583/stable30

[stable30] fix(apps): Sort names separately from active/update state
pull/52664/head
Kent Delante 2025-05-06 19:31:50 +07:00 committed by GitHub
commit 8f6fe59486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 9 deletions

@ -200,9 +200,13 @@ export default {
const apps = [...this.$store.getters.getAllApps, ...exApps]
.filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1)
.sort(function(a, b) {
const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1) + a.name
const sortStringB = '' + (b.active ? 0 : 1) + (b.update ? 0 : 1) + b.name
return OC.Util.naturalSortCompare(sortStringA, sortStringB)
const natSortDiff = OC.Util.naturalSortCompare(a, b)
if (natSortDiff === 0) {
const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1)
const sortStringB = '' + (b.active ? 0 : 1) + (b.update ? 0 : 1)
return Number(sortStringA) - Number(sortStringB)
}
return natSortDiff
})
if (this.category === 'installed') {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long