Retain profiles order, no active on top

This commit is contained in:
Davide De Rosa 2022-07-03 23:59:30 +02:00
parent e8f65e9db0
commit ebe8ae3d29
1 changed files with 10 additions and 10 deletions

View File

@ -117,16 +117,16 @@ extension OrganizerView {
private var sortedHeaders: [Profile.Header] { private var sortedHeaders: [Profile.Header] {
profileManager.headers profileManager.headers
// .sorted() .sorted()
.sorted { // .sorted {
if profileManager.isActiveProfile($0.id) { // if profileManager.isActiveProfile($0.id) {
return true // return true
} else if profileManager.isActiveProfile($1.id) { // } else if profileManager.isActiveProfile($1.id) {
return false // return false
} else { // } else {
return $0 < $1 // return $0 < $1
} // }
} // }
} }
private func removeProfiles(at offsets: IndexSet) { private func removeProfiles(at offsets: IndexSet) {