name button earlier

This commit is contained in:
Zlatin Balevsky
2019-11-14 04:25:45 +00:00
parent 7dc37e3e0d
commit 71da8e14da

View File

@@ -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