Remove async call since the Big Sur bug that it was working around appears to be fixed. Fixes #2791

This commit is contained in:
Maurice Parker 2021-02-15 17:49:28 -06:00
parent 0f295affda
commit 25ee970562

View File

@ -62,14 +62,12 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
sharingServicePickerDelegate = SharingServicePickerDelegate(self.window) sharingServicePickerDelegate = SharingServicePickerDelegate(self.window)
if #available(macOS 11.0, *) { if #available(macOS 11.0, *) {
DispatchQueue.main.async { let toolbar = NSToolbar(identifier: "MainWindowToolbar")
let toolbar = NSToolbar(identifier: "MainWindowToolbar") toolbar.allowsUserCustomization = true
toolbar.allowsUserCustomization = true toolbar.autosavesConfiguration = true
toolbar.autosavesConfiguration = true toolbar.displayMode = .iconOnly
toolbar.displayMode = .iconOnly toolbar.delegate = self
toolbar.delegate = self self.window?.toolbar = toolbar
self.window?.toolbar = toolbar
}
} else { } else {
if !AppDefaults.shared.showTitleOnMainWindow { if !AppDefaults.shared.showTitleOnMainWindow {
window?.titleVisibility = .hidden window?.titleVisibility = .hidden