/** * Updates the write state for the user. This is useful to see which users are currently writing. * * <p>If the user is the application user, messages will be sent to the other clients to notify of * changes. * * @param code The user code for the user to update. * @param writing True if the user is writing. */ public void changeWriting(final int code, final boolean writing) { userListController.changeWriting(code, writing); if (code == me.getCode()) { chatState.setWrote(writing); if (writing) { messages.sendWritingMessage(); } else { messages.sendStoppedWritingMessage(); } } }