macOS: Start refreshing runtime info in viewWillAppear(), not init()
Because when the window is closed and reopened, we should start refreshing runtime info again. Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
a18614d6b3
commit
30da10a0e9
|
@ -101,7 +101,6 @@ class TunnelDetailTableViewController: NSViewController {
|
||||||
super.init(nibName: nil, bundle: nil)
|
super.init(nibName: nil, bundle: nil)
|
||||||
updateTableViewModelRowsBySection()
|
updateTableViewModelRowsBySection()
|
||||||
updateTableViewModelRows()
|
updateTableViewModelRows()
|
||||||
updateStatus()
|
|
||||||
statusObservationToken = tunnel.observe(\TunnelContainer.status) { [weak self] _, _ in
|
statusObservationToken = tunnel.observe(\TunnelContainer.status) { [weak self] _, _ in
|
||||||
self?.updateStatus()
|
self?.updateStatus()
|
||||||
}
|
}
|
||||||
|
@ -227,6 +226,12 @@ class TunnelDetailTableViewController: NSViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear() {
|
||||||
|
if tunnel.status == .active {
|
||||||
|
startUpdatingRuntimeConfiguration()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func viewWillDisappear() {
|
override func viewWillDisappear() {
|
||||||
super.viewWillDisappear()
|
super.viewWillDisappear()
|
||||||
if let tunnelEditVC = tunnelEditVC {
|
if let tunnelEditVC = tunnelEditVC {
|
||||||
|
|
Loading…
Reference in New Issue