show disconnects

This commit is contained in:
Zlatin Balevsky
2019-11-12 11:34:23 +00:00
parent eec007e83b
commit b1b2bcaef8
2 changed files with 6 additions and 3 deletions

View File

@@ -164,7 +164,10 @@ class ChatRoomController {
void handleLeave(Persona p) { void handleLeave(Persona p) {
String toDisplay = DataHelper.formatTime(System.currentTimeMillis()) + " " + p.getHumanReadableName() + " disconnected\n" String toDisplay = DataHelper.formatTime(System.currentTimeMillis()) + " " + p.getHumanReadableName() + " disconnected\n"
runInsideUIAsync { runInsideUIAsync {
if (model.members.remove(p)) {
view.roomTextArea.append(toDisplay) view.roomTextArea.append(toDisplay)
view.membersTable?.model?.fireTableDataChanged()
}
} }
} }
} }

View File

@@ -99,8 +99,8 @@ class ChatServerModel {
} }
private void handleLeave(Persona p) { private void handleLeave(Persona p) {
mvcGroup.childrenGroups.each { mvcGroup.childrenGroups.each { k, v ->
it.controller.handleLeave(p) v.controller.handleLeave(p)
} }
} }
} }