fix Problem with StringBuilder in ClientMessageList
This commit is contained in:
1 parent
eb0e6d0dbc
commit
b246c3c7e3
2 files changed
+2
-2
No files matched your search
@@ -189,7 +189,7 @@ public class ChatWindowController {
|
||||
|
||||
private void redrawMessageList() {
|
||||
this.messageArea.clear();
|
||||
Platform.runLater(() -> this.messageArea.appendText(messages.getFilteredMessages(filterValue.getText().strip())));
|
||||
Platform.runLater(() -> this.messageArea.setText(messages.getFilteredMessages(filterValue.getText().strip())));
|
||||
}
|
||||
|
||||
class WindowCloseHandler implements EventHandler<WindowEvent> {
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ClientMessageList {
|
||||
}
|
||||
|
||||
public String getFilteredMessages(String filter) {
|
||||
StringBuilder result = null;
|
||||
StringBuilder result = new StringBuilder();
|
||||
boolean showAll = filter == null || filter.isBlank();
|
||||
for(Message message : messages) {
|
||||
if(showAll || message.matchesFilter(filter))
|
||||
|
||||
Reference in new issue
Block a user