@@ -24,7 +24,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
24
24
private var cancellables : Set < AnyCancellable > = [ ]
25
25
@AppStorage ( " isDarkMode " ) private var isDarkMode : Bool = false
26
26
27
-
28
27
func application( _ application: NSApplication , open urls: [ URL ] ) {
29
28
guard let url = urls. first else { return }
30
29
switch url. host? . lowercased ( ) {
@@ -62,6 +61,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
62
61
. environmentObject ( AppStateManager . shared)
63
62
)
64
63
configureAppUpdateNotificationCommand ( mode: appStateManager. preferences. mode)
64
+
65
+ appStateManager. showWindowCallback = { [ weak self] in
66
+ self ? . showWindow ( )
67
+ }
65
68
66
69
if appStateManager. preferences. showDesktopInfo {
67
70
// Initialize transparent window
@@ -161,20 +164,20 @@ class AppDelegate: NSObject, NSApplicationDelegate {
161
164
}
162
165
}
163
166
164
- @objc private func showWindow( ) {
167
+ @objc func showWindow( ) {
165
168
if windowController == nil {
166
169
NSApp . setActivationPolicy ( . regular)
167
170
let contentView = ContentView ( )
168
171
. environmentObject ( AppStateManager . shared)
169
172
. environmentObject ( Preferences ( ) )
170
- . frame ( minWidth: 1500 , minHeight: 900 )
173
+ . frame ( minWidth: 1500 , minHeight: 950 )
171
174
172
175
let hostingController = NSHostingController ( rootView: contentView)
173
176
174
177
let window = NSWindow ( contentViewController: hostingController)
175
- window. setContentSize ( NSSize ( width: 1500 , height: 900 ) )
178
+ window. setContentSize ( NSSize ( width: 1500 , height: 950 ) )
176
179
window. styleMask = [ . titled, . closable, . resizable]
177
- window. minSize = NSSize ( width: 1500 , height: 900 )
180
+ window. minSize = NSSize ( width: 1500 , height: 950 )
178
181
window. title = " "
179
182
window. isReleasedWhenClosed = false
180
183
window. backgroundColor = . clear
0 commit comments