Get the app delegate the old-fashioned way.

This commit is contained in:
Brent Simmons
2024-06-30 18:06:49 -07:00
parent 512aee6ce8
commit e990b7aab1
3 changed files with 12 additions and 4 deletions

View File

@@ -578,6 +578,7 @@ extension MainWindowController: NSWindowDelegate {
func windowWillClose(_ notification: Notification) {
detailViewController?.stopMediaPlayback()
let appDelegate = NSApp.delegate as! AppDelegate
appDelegate.removeMainWindow(self)
}
@@ -1248,7 +1249,8 @@ private extension MainWindowController {
}
guard let selectedObjects = selectedObjectsInSidebar(), selectedObjects.count > 0 else {
window?.title = appDelegate.appName!
window?.title = AppConfig.appName
let appDelegate = NSApp.delegate as! AppDelegate
setSubtitle(appDelegate.unreadCount)
return
}