From 005b1ed9c9918e92573a16e4b7b899cbcdd460d8 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Mon, 1 Sep 2025 17:17:38 +0100 Subject: [PATCH] fix --- ShhShell/Views/Hosts/ConnectionView.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ShhShell/Views/Hosts/ConnectionView.swift b/ShhShell/Views/Hosts/ConnectionView.swift index 364765e..b3da1c8 100644 --- a/ShhShell/Views/Hosts/ConnectionView.swift +++ b/ShhShell/Views/Hosts/ConnectionView.swift @@ -143,10 +143,11 @@ Hostkey fingerprint is \(handler.getHostkey() ?? "nil") Button() { handler.go() showTerminal = checkShell(handler.state) -// if showTerminal { -// hostsManager.addToHistory(handler.host) -// handler.writeToChannel(hostsManager.snippets.first(where: { $0.id == handler.host.startupSnippetID })?.content) -// } + DispatchQueue.main.asyncAfter(deadline: .now()+0.1) { + guard checkShell(handler.state) else { return } + hostsManager.addToHistory(handler.host) + handler.writeToChannel(hostsManager.snippets.first(where: { $0.id == handler.host.startupSnippetID })?.content) + } } label: { Label("Connect", systemImage: "power") }