Skip to content

Commit

Permalink
Workaround fixing client crashes(hopefully)
Browse files Browse the repository at this point in the history
Fixes #1080
  • Loading branch information
1-alex98 authored and Brutus5000 committed Jun 11, 2019
1 parent d01a2db commit ba125b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public abstract class AbstractChatTabController implements Controller<Tab> {
private String receiver;
private Pattern mentionPattern;
private ChatMessage lastMessage;
private WebEngine engine;
WebEngine engine;

@Inject
// TODO cut dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ private void removeUserMessageClass(ChatChannelUser chatUser, String cssClass) {
if (cssClass.isEmpty()) {
return;
}
Platform.runLater(() -> getJsObject().call("removeUserMessageClass", String.format(USER_CSS_CLASS_FORMAT, chatUser.getUsername()), cssClass));

//Workaround for issue #1080 https://github.com/FAForever/downlords-faf-client/issues/1080
Platform.runLater(() -> engine.executeScript("removeUserMessageClass(\'" + String.format(USER_CSS_CLASS_FORMAT, chatUser.getUsername()) + "\',\'" + cssClass + "\');"));
}

private void addUserMessageClass(ChatChannelUser player, String cssClass) {
Expand Down

0 comments on commit ba125b9

Please sign in to comment.