Add selector title to the network

pull/2/head
Michael Scoff 7 years ago
parent f2509cf6c7
commit 9c406e9602
  1. 3
      Trust/Settings/ViewControllers/SettingsViewController.swift
  2. 4
      Trust/Settings/ViewModels/SettingsViewModel.swift

@ -45,9 +45,10 @@ class SettingsViewController: FormViewController {
form = Section()
<<< PushRow<String> {
$0.title = NSLocalizedString("settings.network.button.title", value: "Network", comment: "")
$0.title = viewModel.networkTitle
$0.options = viewModel.servers
$0.value = RPCServer(chainID: config.chainID).name
$0.selectorTitle = viewModel.networkTitle
$0.displayValueFor = { value in
let network = RPCServer(name: value ?? "")
return network.name + (network.isTestNetwork ? " (Test)" : "")

@ -43,4 +43,8 @@ struct SettingsViewModel {
return NSLocalizedString("settings.biometricsDisabled.label.title", value: "Passcode", comment: "")
}
}
var networkTitle: String {
return NSLocalizedString("settings.network.button.title", value: "Network", comment: "")
}
}

Loading…
Cancel
Save