mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 00:22:26 +00:00
Fix again server ordering
This commit is contained in:
parent
db6f7bdf28
commit
c2aef310f3
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user