Fix re-enter jitsi call
This commit is contained in:
parent
2d25d0f916
commit
b34de2c79d
1 changed files with 16 additions and 11 deletions
|
@ -31,18 +31,19 @@ function JitsiRoom(props) {
|
|||
const roomTimeline = new RoomTimeline(rId);
|
||||
const topic = roomTimeline.room.currentState.getStateEvents('m.room.topic')[0]?.getContent().topic
|
||||
|
||||
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL && confirm('Do you want to join this call?')) {
|
||||
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL) {
|
||||
if (confirm('Do you want to join this call?')) {
|
||||
setRoomInfo({
|
||||
roomTimeline,
|
||||
eventId: eId ?? null,
|
||||
});
|
||||
} else {
|
||||
// TODO: add ability to join room if roomId is invalid
|
||||
} else if (!jitsiCallId) {
|
||||
setRoomInfo({
|
||||
roomTimeline: null,
|
||||
eventId: null,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
navigation.on(cons.events.navigation.ROOM_SELECTED, handleRoomSelected);
|
||||
|
@ -80,6 +81,10 @@ function JitsiRoom(props) {
|
|||
onClick={() => {
|
||||
setJitsiCallId(null);
|
||||
setRoomName('');
|
||||
setRoomInfo({
|
||||
roomTimeline: null,
|
||||
eventId: null,
|
||||
});
|
||||
}}
|
||||
>
|
||||
X
|
||||
|
|
Loading…
Reference in a new issue