Merge pull request #59848 from nextcloud/jtr/fix-settings-sort-list

fix(settings): sort app list by app name instead of app objects
This commit is contained in:
Ferdinand Thiessen 2026-04-29 15:25:08 +02:00 committed by GitHub
commit 4cd65b080a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 12 deletions

View file

@ -226,13 +226,12 @@ export default {
const apps = [...this.$store.getters.getAllApps, ...exApps]
.filter((app) => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1)
.sort(function(a, b) {
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)
const statusA = (a.active ? 0 : 2) + (a.update ? 0 : 1)
const statusB = (b.active ? 0 : 2) + (b.update ? 0 : 1)
if (statusA !== statusB) {
return statusA - statusB
}
return natSortDiff
return OC.Util.naturalSortCompare(a.name, b.name)
})
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