Skip to content

Commit

Permalink
feat(prejoin): fix join meeting from external/calendar link while in …
Browse files Browse the repository at this point in the history
…another meeting (#15310)

If you are in meeting and you want to join another meeting from an external link, it is not possible.
That is because Prejoin screen didn't get unmounted, isJoining remains true and button is unpressable.
Most probably because react navigation, where the screen only gets focused or blurred.
  • Loading branch information
Calinteodor authored Nov 18, 2024
1 parent 50e9413 commit 63e69c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
10 changes: 0 additions & 10 deletions react/features/prejoin/actionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ export const SET_DIALOUT_STATUS = 'SET_DIALOUT_STATUS';
*/
export const SET_JOIN_BY_PHONE_DIALOG_VISIBLITY = 'SET_JOIN_BY_PHONE_DIALOG_VISIBLITY';

/**
* Action type to disable the audio while on prejoin page.
*/
export const SET_PREJOIN_AUDIO_DISABLED = 'SET_PREJOIN_AUDIO_DISABLED';

/**
* Action type to mute/unmute the audio while on prejoin page.
*/
export const SET_PREJOIN_AUDIO_MUTED = 'SET_PREJOIN_AUDIO_MUTED';

/**
* Action type to set the errors while creating the prejoin streams.
*/
Expand Down
7 changes: 2 additions & 5 deletions react/features/prejoin/components/native/Prejoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
const showDisplayNameInput = useMemo(
() => isDisplayNameVisible && (displayName || !isDisplayNameReadonly),
[ displayName, isDisplayNameReadonly, isDisplayNameVisible ]);
const [ isJoining, setIsJoining ]
= useState(false);
const onChangeDisplayName = useCallback(event => {
const fieldValue = getFieldValue(event);

Expand All @@ -82,7 +80,6 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
}, [ displayName ]);

const onJoin = useCallback(() => {
setIsJoining(true);
dispatch(connect());
navigateRoot(screen.conference.root);
}, [ dispatch ]);
Expand Down Expand Up @@ -212,14 +209,14 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
accessibilityLabel = 'prejoin.joinMeeting'
disabled = { showDisplayNameError }
labelKey = 'prejoin.joinMeeting'
onClick = { isJoining ? undefined : maybeJoin }
onClick = { maybeJoin }
style = { styles.joinButton }
type = { PRIMARY } />
<Button
accessibilityLabel = 'prejoin.joinMeetingInLowBandwidthMode'
disabled = { showDisplayNameError }
labelKey = 'prejoin.joinMeetingInLowBandwidthMode'
onClick = { isJoining ? undefined : onJoinLowBandwidth }
onClick = { onJoinLowBandwidth }
style = { styles.joinButton }
type = { TERTIARY } />
</View>
Expand Down

0 comments on commit 63e69c2

Please sign in to comment.