Improve pool name in MoveToLocation intent

This commit is contained in:
Davide De Rosa 2019-04-07 16:03:25 +02:00
parent 94191a4b6b
commit 64e00fdadd
3 changed files with 2 additions and 13 deletions

View File

@ -158,7 +158,7 @@ extension ProviderPoolViewController: UITableViewDataSource, UITableViewDelegate
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.imageView?.image = pool.logo
cell.leftText = pool.localizedName
cell.leftText = pool.localizedCountry
if groupPools.count > 1 {
cell.rightText = pool.area?.uppercased()
cell.accessoryType = .detailDisclosureButton // no checkmark!

View File

@ -54,7 +54,7 @@ public class IntentDispatcher {
let intent = MoveToLocationIntent()
intent.providerId = profile.id
intent.poolId = pool.id
intent.poolName = pool.localizedName
intent.poolName = pool.localizedId
return intent
}

View File

@ -137,15 +137,4 @@ extension Pool {
}
return String.init(format: Pool.localizedFormat, countryString, zone.uppercased())
}
public var localizedName: String {
// // XXX: name from API is not localized
// if !name.isEmpty {
// return name
// }
// return localizedCountryArea
return localizedCountry
}
}