UI freezes when accepting a room invite
@@ -109,7 +109,6 @@ public class JoinRoomSwingWorker extends SwingWorker
}
AtomicReference<ChatRoom> roomUIObject = new AtomicReference<>();
- EventQueue.invokeAndWait(() -> {
// Create a UI component, if one was not yet created. It is important that this happens before the MUC is
// joined server-side, as the UI component needs to be able to display data that is sent by the server upon
// joining the room.
@@ -122,7 +121,6 @@ public class JoinRoomSwingWorker extends SwingWorker
((GroupChatRoom) room).setTabTitle(tabTitle);
}
roomUIObject.set(room);
- });
Log.debug("... created UI object for " + roomJID);
if ( !groupChat.isJoined() ) {
@@ -143,7 +141,7 @@ public class JoinRoomSwingWorker extends SwingWorker
}
AtomicBoolean wontJoin = new AtomicBoolean(false);
- EventQueue.invokeAndWait(() -> {
+ EventQueue.invokeLater(() -> {
if (!ConferenceUtils.confirmToRevealVisibility()) {
wontJoin.set(true);
}
