macOS: Log view: Stop updating the log once the log view is dismissed

This commit is contained in:
Roopesh Chander 2019-04-10 15:07:48 +05:30
parent 8eb3795efb
commit af9bd363bd
1 changed files with 10 additions and 0 deletions

View File

@ -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")