Skip to content

Commit

Permalink
fix: rejoin not working sometimes (#3250)
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 authored Sep 9, 2024
1 parent 0fe4017 commit 9445ac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/roomkit-react/src/Prebuilt/AppStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ export const useAppStateManager = () => {
[HMSRoomState.Disconnected, HMSRoomState.Connecting],
[HMSRoomState.Disconnected, HMSRoomState.Reconnecting],
() => {
setActiveState(
match({ isLeaveScreenEnabled, isPreviewScreenEnabled })
.with({ isLeaveScreenEnabled: true }, () => PrebuiltStates.LEAVE)
setActiveState(prevState => {
return match({ isLeaveScreenEnabled, isPreviewScreenEnabled, prevState })
.with({ isLeaveScreenEnabled: true, prevState: PrebuiltStates.MEETING }, () => PrebuiltStates.LEAVE)
.with({ isPreviewScreenEnabled: true }, () => PrebuiltStates.PREVIEW)
.otherwise(() => PrebuiltStates.MEETING),
);
.otherwise(() => PrebuiltStates.MEETING);
});
VBHandler.reset();
redirectToLeave(1000); // to clear toasts after 1 second
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const InsetTile = ({ peerId }: { peerId?: string }) => {
position: 'absolute',
bottom: 0,
right: 0,
zIndex: 11,
zIndex: 10,
boxShadow: '0 0 8px 0 rgba(0,0,0,0.3)',
r: '$2',
...(!minimised
Expand Down

0 comments on commit 9445ac4

Please sign in to comment.