File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,19 @@ public extension Notification.Name {
99class AppDelegate : NSObject , NSApplicationDelegate {
1010 func applicationWillFinishLaunching( _ notification: Notification ) {
1111 let _ = DocumentationWindows . shared
12+ URLEventHandler . shared. install ( )
1213 }
1314
1415 func applicationDidFinishLaunching( _ aNotification: Notification ) {
1516 Summoner . shared. install ( )
16- URLEventHandler . shared. install ( )
17- DocumentationWindows . shared. restore ( )
17+
18+ if GeneralPreferences . shouldRestoreDocs ( ) {
19+ DocumentationWindows . shared. restore ( )
20+ }
21+
22+ DispatchQueue . main. async {
23+ DocumentationWindows . shared. newWindowIfNoWindow ( )
24+ }
1825 }
1926
2027 func applicationWillTerminate( _ aNotification: Notification ) {
Original file line number Diff line number Diff line change @@ -44,10 +44,6 @@ class DocumentationWindows: NSObject {
4444 }
4545
4646 func restore( ) {
47- if !GeneralPreferences. shouldRestoreDocs ( ) {
48- newWindow ( )
49- return
50- }
5147 if let urls = Storage . getLocations ( ) {
5248 urls. filter { url -> Bool in
5349 if let host = url. host {
@@ -58,8 +54,6 @@ class DocumentationWindows: NSObject {
5854 } . forEach { url in
5955 newWindow ( forURL: url)
6056 }
61- } else {
62- newWindow ( )
6357 }
6458 }
6559}
You can’t perform that action at this time.
0 commit comments