diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-26 17:30:41 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-26 17:30:41 -0700 |
| commit | bb292ec9ade3ed323108ff805b4a6c53115122ba (patch) | |
| tree | d46ca0e40a9c1d9019c3c078e8fa8fe48b5f0d54 /Hotline/macOS/ServerView.swift | |
| parent | 63cc41b93eec7505c3a93a1537fb62ae9a723237 (diff) | |
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.
Diffstat (limited to 'Hotline/macOS/ServerView.swift')
| -rw-r--r-- | Hotline/macOS/ServerView.swift | 6 |
1 files changed, 5 insertions, 1 deletions
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) |