From bb292ec9ade3ed323108ff805b4a6c53115122ba Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Sun, 26 May 2024 17:30:41 -0700 Subject: Hold option when double clicking server in Servers window to open window for that server without autoconnecting. Found a better way to check for currently pressed key modifiers. --- Hotline/macOS/ServerView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Hotline/macOS/ServerView.swift') diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift index e342f73..89f353b 100644 --- a/Hotline/macOS/ServerView.swift +++ b/Hotline/macOS/ServerView.swift @@ -224,7 +224,11 @@ struct ServerView: View { connectAddress = server.address connectLogin = server.login connectPassword = server.password - connectToServer() + + // Connect to server automatically unless the option key is held down. + if !NSEvent.modifierFlags.contains(.option) { + connectToServer() + } } .focusedSceneValue(\.activeHotlineModel, model) .focusedSceneValue(\.activeServerState, state) -- cgit