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] {
profileManager.headers
// .sorted()
.sorted {
if profileManager.isActiveProfile($0.id) {
return true
} else if profileManager.isActiveProfile($1.id) {
return false
} else {
return $0 < $1
}
}
.sorted()
// .sorted {
// if profileManager.isActiveProfile($0.id) {
// return true
// } else if profileManager.isActiveProfile($1.id) {
// return false
// } else {
// return $0 < $1
// }
// }
}
private func removeProfiles(at offsets: IndexSet) {