File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -100,22 +100,19 @@ struct SwiftcordApp: App {
100100 }
101101 }
102102 . commands {
103+ #if !APP_STORE
103104 CommandGroup ( after: . appInfo) {
104- #if !APP_STORE
105105 CheckForUpdatesView ( updaterViewModel: updaterViewModel)
106- #endif
107- if #available( macOS 13 , * ) {
108- SettingsCommands ( )
109- }
110106 }
107+ #endif
111108
112109 SidebarCommands ( )
113110 NavigationCommands ( state: state, gateway: gateway)
114111 }
115112 . windowStyle ( . hiddenTitleBar)
116113 . windowToolbarStyle ( . unified)
117114
118- WindowGroup ( id : " settings " ) { // Identify the window group.
115+ Settings {
119116 SettingsView ( )
120117 . environmentObject ( gateway)
121118 . environmentObject ( state)
@@ -125,7 +122,18 @@ struct SwiftcordApp: App {
125122 ? . dark
126123 : ( selectedTheme == " light " ? . light : . none)
127124 )
128- } . contentSizedWindowResizability ( )
125+ . task {
126+ // print("run")
127+ let window = NSApp . windows. first { $0. identifier? . rawValue == " com_apple_SwiftUI_Settings_window " } !
128+ window. toolbarStyle = . unified
129+
130+ let sidebaritem = " com.apple.SwiftUI.navigationSplitView.toggleSidebar "
131+ let index = window. toolbar? . items. firstIndex { $0. itemIdentifier. rawValue == sidebaritem }
132+ if let index {
133+ window. toolbar? . removeItem ( at: index)
134+ }
135+ }
136+ }
129137 }
130138}
131139
You can’t perform that action at this time.
0 commit comments