From b19120487904c2f0bc07e0b305141ec006e86c87 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Wed, 8 Jul 2026 22:16:49 -0700 Subject: [PATCH] fix: add a View menu command to restore the server window sidebar --- Hotline/MacApp.swift | 10 +++++++++- Hotline/State/ServerState.swift | 1 + Hotline/macOS/ServerView.swift | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Hotline/MacApp.swift b/Hotline/MacApp.swift index f72bdcbe..bc443de4 100644 --- a/Hotline/MacApp.swift +++ b/Hotline/MacApp.swift @@ -110,6 +110,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele } } + @main struct Application: App { @Environment(\.scenePhase) private var scenePhase @@ -318,6 +319,14 @@ struct Application: App { } .keyboardShortcut(.init("K"), modifiers: .command) } + CommandGroup(replacing: .sidebar) { + Button("Show Sidebar") { + withAnimation { + activeServerState?.columnVisibility = .all + } + } + .keyboardShortcut("S", modifiers: [.command, .option]) + } CommandGroup(before: .singleWindowList) { Button("Toolbar") { self.toggleBannerWindow() @@ -507,4 +516,3 @@ struct Application: App { } } } - diff --git a/Hotline/State/ServerState.swift b/Hotline/State/ServerState.swift index 10ffabb3..f36f17e7 100644 --- a/Hotline/State/ServerState.swift +++ b/Hotline/State/ServerState.swift @@ -5,6 +5,7 @@ class ServerState: Equatable { var id: UUID = UUID() var selection: ServerNavigationType var serverName: String? = nil + var columnVisibility: NavigationSplitViewVisibility = .all var accountsShown: Bool = false var broadcastShown: Bool = false var fileNavigationPath: [String]? = nil diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift index 9598cac4..73b55643 100644 --- a/Hotline/macOS/ServerView.swift +++ b/Hotline/macOS/ServerView.swift @@ -413,7 +413,7 @@ struct ServerView: View { } var serverView: some View { - NavigationSplitView { + NavigationSplitView(columnVisibility: self.$state.columnVisibility) { self.navigationList .navigationSplitViewColumnWidth(200) // .navigationSplitViewColumnWidth(min: 150, ideal: 200, max: 400)