Fix titles on Big Sur

This commit is contained in:
Maurice Parker
2020-08-08 21:28:43 -05:00
parent 0a9496a583
commit 57d988da95
2 changed files with 21 additions and 26 deletions

View File

@@ -61,8 +61,11 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
sharingServicePickerDelegate = SharingServicePickerDelegate(self.window)
if !AppDefaults.shared.showTitleOnMainWindow {
window?.titleVisibility = .hidden
if #available(macOS 10.16, *) {
} else {
if !AppDefaults.shared.showTitleOnMainWindow {
window?.titleVisibility = .hidden
}
}
if let window = window {
@@ -983,14 +986,11 @@ private extension MainWindowController {
}
if displayName != nil {
if unreadCount ?? 0 > 0 {
window?.title = "\(displayName!) (\(unreadCount!))"
window?.title = displayName!
if #available(macOS 10.16, *) {
window?.subtitle = "\(unreadCount ?? 0) unread"
}
else {
window?.title = "\(displayName!)"
}
}
else {
} else {
window?.title = appDelegate.appName!
return
}