Add isOpen property to MainWindowController.

This commit is contained in:
Brent Simmons 2018-01-27 15:04:45 -08:00
parent c2afd03d8c
commit b32d45cd60
1 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,11 @@ private let kWindowFrameKey = "MainWindow"
class MainWindowController : NSWindowController, NSUserInterfaceValidations { class MainWindowController : NSWindowController, NSUserInterfaceValidations {
// MARK: NSWindowController var isOpen: Bool {
return isWindowLoaded && window!.isVisible
}
// MARK: NSWindowController
private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey) private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey)
private var unreadCount: Int = 0 { private var unreadCount: Int = 0 {