Fix iOS pools rendering accordingly
This commit is contained in:
parent
9b50c8dc45
commit
252fef8b4d
|
@ -204,7 +204,6 @@ extension ProviderPoolViewController: UITableViewDataSource, UITableViewDelegate
|
||||||
cell.imageView?.image = group.logo
|
cell.imageView?.image = group.logo
|
||||||
cell.leftText = pool.localizedCountry
|
cell.leftText = pool.localizedCountry
|
||||||
if group.pools.count > 1 {
|
if group.pools.count > 1 {
|
||||||
cell.rightText = pool.area
|
|
||||||
cell.accessoryType = .detailDisclosureButton // no checkmark!
|
cell.accessoryType = .detailDisclosureButton // no checkmark!
|
||||||
} else {
|
} else {
|
||||||
cell.rightText = pool.secondaryId
|
cell.rightText = pool.secondaryId
|
||||||
|
@ -231,20 +230,9 @@ extension ProviderPoolViewController: UITableViewDataSource, UITableViewDelegate
|
||||||
let vc = SingleOptionViewController<Pool>()
|
let vc = SingleOptionViewController<Pool>()
|
||||||
vc.applyTint(.current)
|
vc.applyTint(.current)
|
||||||
vc.title = group.localizedCountry
|
vc.title = group.localizedCountry
|
||||||
vc.options = group.pools.sorted {
|
vc.options = group.pools.sortedPools()
|
||||||
guard let lnum = $0.num else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
guard let rnum = $1.num else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
guard lnum != rnum else {
|
|
||||||
return $0.secondaryId < $1.secondaryId
|
|
||||||
}
|
|
||||||
return lnum < rnum
|
|
||||||
}
|
|
||||||
vc.selectedOption = currentPool
|
vc.selectedOption = currentPool
|
||||||
vc.descriptionBlock = { $0.secondaryId }
|
vc.descriptionBlock = { !$0.secondaryId.isEmpty ? $0.secondaryId : "Default" }
|
||||||
vc.selectionBlock = {
|
vc.selectionBlock = {
|
||||||
self.currentPool = $0
|
self.currentPool = $0
|
||||||
self.delegate?.providerPoolController(self, didSelectPool: $0)
|
self.delegate?.providerPoolController(self, didSelectPool: $0)
|
||||||
|
|
Loading…
Reference in New Issue