Fix again server ordering

This commit is contained in:
Davide De Rosa 2022-09-15 21:59:32 +02:00
parent db6f7bdf28
commit c2aef310f3
1 changed files with 7 additions and 7 deletions

View File

@ -71,13 +71,7 @@ extension ProviderServer: Comparable {
// "Default" comes first (nil localizedName)
public static func <(lhs: Self, rhs: Self) -> Bool {
guard let ld = lhs.localizedName else {
return true
}
guard let rd = rhs.localizedName else {
return false
}
guard ld != rd else {
guard lhs.localizedName != rhs.localizedName else {
guard let li = lhs.serverIndex else {
return true
}
@ -92,6 +86,12 @@ extension ProviderServer: Comparable {
}
return li < ri
}
guard let ld = lhs.localizedName else {
return true
}
guard let rd = rhs.localizedName else {
return false
}
return ld < rd
}
}