mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-01-17 22:09:06 +00:00
s/Observervation/Observation/g;
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
78eaab8b5b
commit
3ae9fb538d
@ -8,12 +8,12 @@ class TunnelListCell: UITableViewCell {
|
||||
didSet(value) {
|
||||
// Bind to the tunnel's name
|
||||
nameLabel.text = tunnel?.name ?? ""
|
||||
nameObservervationToken = tunnel?.observe(\.name) { [weak self] tunnel, _ in
|
||||
nameObservationToken = tunnel?.observe(\.name) { [weak self] tunnel, _ in
|
||||
self?.nameLabel.text = tunnel.name
|
||||
}
|
||||
// Bind to the tunnel's status
|
||||
update(from: tunnel?.status)
|
||||
statusObservervationToken = tunnel?.observe(\.status) { [weak self] tunnel, _ in
|
||||
statusObservationToken = tunnel?.observe(\.status) { [weak self] tunnel, _ in
|
||||
self?.update(from: tunnel.status)
|
||||
}
|
||||
}
|
||||
@ -36,8 +36,8 @@ class TunnelListCell: UITableViewCell {
|
||||
|
||||
let statusSwitch = UISwitch()
|
||||
|
||||
private var statusObservervationToken: AnyObject?
|
||||
private var nameObservervationToken: AnyObject?
|
||||
private var statusObservationToken: AnyObject?
|
||||
private var nameObservationToken: AnyObject?
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
|
@ -29,8 +29,8 @@ class TunnelDetailTableViewController: UITableViewController {
|
||||
let tunnel: TunnelContainer
|
||||
var tunnelViewModel: TunnelViewModel
|
||||
private var sections = [Section]()
|
||||
private var onDemandStatusObservervationToken: AnyObject?
|
||||
private var statusObservervationToken: AnyObject?
|
||||
private var onDemandStatusObservationToken: AnyObject?
|
||||
private var statusObservationToken: AnyObject?
|
||||
|
||||
init(tunnelsManager: TunnelsManager, tunnel: TunnelContainer) {
|
||||
self.tunnelsManager = tunnelsManager
|
||||
@ -45,8 +45,8 @@ class TunnelDetailTableViewController: UITableViewController {
|
||||
}
|
||||
|
||||
deinit {
|
||||
onDemandStatusObservervationToken = nil
|
||||
statusObservervationToken = nil
|
||||
onDemandStatusObservationToken = nil
|
||||
statusObservationToken = nil
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
@ -196,7 +196,7 @@ extension TunnelDetailTableViewController {
|
||||
}
|
||||
|
||||
statusUpdate(cell, tunnel.status)
|
||||
statusObservervationToken = tunnel.observe(\.status) { [weak cell] tunnel, _ in
|
||||
statusObservationToken = tunnel.observe(\.status) { [weak cell] tunnel, _ in
|
||||
guard let cell = cell else { return }
|
||||
statusUpdate(cell, tunnel.status)
|
||||
}
|
||||
@ -232,7 +232,7 @@ extension TunnelDetailTableViewController {
|
||||
let cell: KeyValueCell = tableView.dequeueReusableCell(for: indexPath)
|
||||
cell.key = "Activate on demand"
|
||||
cell.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting())
|
||||
onDemandStatusObservervationToken = tunnel.observe(\.isActivateOnDemandEnabled) { [weak cell] tunnel, _ in
|
||||
onDemandStatusObservationToken = tunnel.observe(\.isActivateOnDemandEnabled) { [weak cell] tunnel, _ in
|
||||
cell?.value = TunnelViewModel.activateOnDemandDetailText(for: tunnel.activateOnDemandSetting())
|
||||
}
|
||||
return cell
|
||||
|
Loading…
Reference in New Issue
Block a user