Skip to content

Commit

Permalink
Don't bind users to prompt text (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Jan 1, 2024
1 parent c46d11a commit 0783514
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -117,10 +117,7 @@ protected void onInitialize() {
.orElse(FXCollections.observableSet())
.when(showing));

searchUsernameTextField.promptTextProperty()
.bind(users.flatMap(Bindings::size)
.map(size -> i18n.get("chat.userCount", size))
.when(showing));
searchUsernameTextField.setPromptText(i18n.get("chat.search.prompt"));

users.when(showing).subscribe((oldValue, newValue) -> {
unfilteredItems.removeIf(item -> item.user() != null);
Expand Down
Expand Up @@ -540,12 +540,14 @@ private void onDisconnect(ClientConnectionEndedEvent event) {
List.copyOf(channels.keySet()).forEach(this::removeChannel);
connectionState.set(ConnectionState.DISCONNECTED);
client.shutdown();
event.getCause().ifPresent(throwable -> log.error("Chat disconnected with cause", throwable));
}

@Handler
private void onFailedConnect(ClientConnectionFailedEvent event) {
connectionState.set(ConnectionState.DISCONNECTED);
client.shutdown();
event.getCause().ifPresent(throwable -> log.error("Chat disconnected with cause", throwable));
}

private void onSocialMessage(SocialInfo socialMessage) {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/i18n/messages.properties
Expand Up @@ -116,6 +116,7 @@ chat.sendActionTask.title = Sending chat action…
chat.clanTagFormat = [{0}]
chat.imageUploadTask.title = Uploading image…
chat.userCount = {0,number,#} users (type to search)
chat.search.prompt=Search for user…
chat.mapName = Map Name\: {0}
chat.filter.filter = Filter
chat.filter.prompt = Search in channel
Expand Down

0 comments on commit 0783514

Please sign in to comment.