Fix repeating "Default" servers in some providers

Disambiguate by apiId.
This commit is contained in:
Davide De Rosa 2022-04-26 22:12:22 +02:00
parent 4b8cff1bb3
commit 6bff878952
2 changed files with 7 additions and 2 deletions

View File

@ -75,7 +75,12 @@ extension ProviderServer: Comparable {
if let li = lhs.serverIndex, let ri = rhs.serverIndex { if let li = lhs.serverIndex, let ri = rhs.serverIndex {
return li < ri return li < ri
} }
return lhs.localizedDetails < rhs.localizedDetails let ld = lhs.localizedDetails
let rd = rhs.localizedDetails
if ld != rd {
return ld < rd
}
return lhs.apiId < rhs.apiId
} }
} }

View File

@ -87,7 +87,7 @@ extension ProviderServer {
} }
var localizedDetailsWithDefault: String { var localizedDetailsWithDefault: String {
return details ?? L10n.Global.Strings.default return details ?? "\(L10n.Global.Strings.default) [\(apiId)]"
} }
} }