diff options
author | Roopesh Chander <roop@roopc.net> | 2019-04-10 15:07:48 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-04-10 15:42:39 +0530 |
commit | 83d0d344112b54d6cd50a4efc697d7122d89e3b2 (patch) | |
tree | 1e2f710666f958e5cf1302544fade21f047d2bf8 /WireGuard/WireGuard | |
parent | Version bump (diff) | |
download | wireguard-apple-83d0d344112b54d6cd50a4efc697d7122d89e3b2.tar.xz wireguard-apple-83d0d344112b54d6cd50a4efc697d7122d89e3b2.zip |
macOS: Log view: Stop updating the log once the log view is dismissed
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift index 3f3a14b..5e86ca2 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/LogViewController.swift @@ -187,6 +187,16 @@ class LogViewController: NSViewController { RunLoop.main.add(timer, forMode: .common) } + func stopUpdatingLogEntries() { + updateLogEntriesTimer?.invalidate() + updateLogEntriesTimer = nil + } + + override func viewWillDisappear() { + super.viewWillDisappear() + stopUpdatingLogEntries() + } + @objc func saveClicked() { let savePanel = NSSavePanel() savePanel.prompt = tr("macSheetButtonExportLog") |