mirror of https://github.com/zlatinb/muwire
clear members list on server disconnect
parent
ff7c4eae28
commit
01ee7209c8
|
@ -271,4 +271,11 @@ class ChatRoomController {
|
||||||
)
|
)
|
||||||
model.core.eventBus.publish(event)
|
model.core.eventBus.publish(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void serverDisconnected() {
|
||||||
|
runInsideUIAsync {
|
||||||
|
model.members.clear()
|
||||||
|
view.membersTable?.fireTableDataChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -18,6 +18,9 @@ class ChatServerController {
|
||||||
switch(model.buttonText) {
|
switch(model.buttonText) {
|
||||||
case "Disconnect" :
|
case "Disconnect" :
|
||||||
model.buttonText = "Connect"
|
model.buttonText = "Connect"
|
||||||
|
mvcGroup.getChildrenGroups().each { k,v ->
|
||||||
|
v.controller.serverDisconnected()
|
||||||
|
}
|
||||||
model.core.eventBus.publish(new UIDisconnectChatEvent(host : model.host))
|
model.core.eventBus.publish(new UIDisconnectChatEvent(host : model.host))
|
||||||
break
|
break
|
||||||
case "Connect" :
|
case "Connect" :
|
||||||
|
|
Loading…
Reference in New Issue