Skip to content

Commit

Permalink
Remove redundant on close
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Apr 22, 2023
1 parent b02b2b1 commit 0183164
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void initialize() {

root.idProperty().bind(channelName);
root.textProperty().bind(channelName.map(name -> name.replaceFirst("^#", "")));
root.onCloseRequestProperty().bind(chatChannel.map(channel -> event -> chatService.leaveChannel(channel)));

chatUserListController.chatChannelProperty().bind(chatChannel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void testShowHideChatUserList() {
@Test
public void testOnTabClosed() {
initializeDefaultChatChannel();
runOnFxThreadAndWait(() -> instance.getRoot().getOnCloseRequest().handle(null));
runOnFxThreadAndWait(() -> instance.getRoot().getOnClosed().handle(null));
verify(chatService).leaveChannel(defaultChatChannel);
}

Expand Down

0 comments on commit 0183164

Please sign in to comment.