macOS: Log view: No need to disable Close button

This commit is contained in:
Roopesh Chander 2019-03-28 19:32:58 +05:30
parent f36f7e456c
commit d3f5c82081
2 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,8 @@ public class LogViewHelper {
LogViewHelper.logEntries.append(LogEntry(timestamp: dateString, message: message)) LogViewHelper.logEntries.append(LogEntry(timestamp: dateString, message: message))
} }
DispatchQueue.main.async { [weak self] in DispatchQueue.main.async { [weak self] in
self?.cursor = newCursor guard let self = self else { return }
self.cursor = newCursor
completion(LogViewHelper.logEntries) completion(LogViewHelper.logEntries)
} }
} }

View File

@ -94,7 +94,6 @@ class LogViewController: NSViewController {
closeButton.target = self closeButton.target = self
closeButton.action = #selector(closeClicked) closeButton.action = #selector(closeClicked)
closeButton.isEnabled = false
saveButton.target = self saveButton.target = self
saveButton.action = #selector(saveClicked) saveButton.action = #selector(saveClicked)
@ -153,7 +152,6 @@ class LogViewController: NSViewController {
} }
if !self.progressIndicator.isHidden { if !self.progressIndicator.isHidden {
self.progressIndicator.stopAnimation(self) self.progressIndicator.stopAnimation(self)
self.closeButton.isEnabled = true
self.saveButton.isEnabled = true self.saveButton.isEnabled = true
} }
guard !fetchedLogEntries.isEmpty else { return } guard !fetchedLogEntries.isEmpty else { return }