From 71da8e14dab218ad4dc58378f46be4b1b842c9e5 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 14 Nov 2019 04:25:45 +0000 Subject: [PATCH] name button earlier --- .../models/com/muwire/gui/ChatServerModel.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/griffon-app/models/com/muwire/gui/ChatServerModel.groovy b/gui/griffon-app/models/com/muwire/gui/ChatServerModel.groovy index 6800bd1c..0ae84a8d 100644 --- a/gui/griffon-app/models/com/muwire/gui/ChatServerModel.groovy +++ b/gui/griffon-app/models/com/muwire/gui/ChatServerModel.groovy @@ -24,7 +24,7 @@ class ChatServerModel { Core core @Observable boolean disconnectActionEnabled - @Observable String buttonText + @Observable String buttonText = "Disconnect" @Observable ChatConnectionAttemptStatus status volatile ChatLink link @@ -39,6 +39,9 @@ class ChatServerModel { } void connect() { + runInsideUIAsync { + buttonText = "Disconnect" + } core.eventBus.publish(new UIConnectChatEvent(host : host)) } @@ -71,9 +74,6 @@ class ChatServerModel { } if (e.status == ChatConnectionAttemptStatus.SUCCESSFUL) { - runInsideUIAsync { - buttonText = "Disconnect" - } ChatLink link = e.connection if (link == null) return