diff --git a/src/ui/cm.tis b/src/ui/cm.tis index 2b42b719c..4136e5a26 100644 --- a/src/ui/cm.tis +++ b/src/ui/cm.tis @@ -318,6 +318,9 @@ handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, na if (conn) { conn.authorized = authorized; update(); + self.timer(30ms, function() { + view.windowState = View.WINDOW_MINIMIZED; + }); return; } var idx = -1; @@ -343,11 +346,6 @@ handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, na bring_to_top(); update(); self.timer(1ms, adjustHeader); - if (authorized) { - self.timer(3s, function() { - view.windowState = View.WINDOW_MINIMIZED; - }); - } } handler.removeConnection = function(id, close) {