Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove peer, end room flow #1849

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { ReconnectNotifications } from './ReconnectNotifications';
import { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';
import { TrackNotifications } from './TrackNotifications';
import { TrackUnmuteModal } from './TrackUnmuteModal';
import { useRoomLayoutLeaveScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
import { useIsNotificationDisabled, useSubscribedNotifications } from '../AppData/useUISettings';
import { getMetadata } from '../../common/utils';
import { ROLE_CHANGE_DECLINED } from '../../common/constants';
Expand All @@ -32,6 +33,7 @@ export function Notifications() {
const roomState = useHMSStore(selectRoomState);
const updateRoomLayoutForRole = useUpdateRoomLayout();
const isNotificationDisabled = useIsNotificationDisabled();
const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();

const handleRoleChangeDenied = useCallback(request => {
ToastManager.addToast({
Expand Down Expand Up @@ -92,10 +94,10 @@ export function Notifications() {
// goto leave for terminal if any action is not performed within 2secs
// if network is still unavailable going to preview will throw an error
setTimeout(() => {
const previewLocation = window.location.pathname.replace('meeting', 'leave');
const previewLocation = window.location.pathname.replace('/meeting', isLeaveScreenEnabled ? '/leave' : '');
raviteja83 marked this conversation as resolved.
Show resolved Hide resolved
ToastManager.clearAllToast();
navigate(previewLocation);
}, 2000);
}, 1000);
return;
}
// Autoplay error or user denied screen share (cancelled browser pop-up)
Expand Down Expand Up @@ -134,10 +136,10 @@ export function Notifications() {
${notification.data.reason && `Reason: ${notification.data.reason}`}`,
});
setTimeout(() => {
const leaveLocation = window.location.pathname.replace('meeting', 'leave');
const leaveLocation = window.location.pathname.replace('/meeting', isLeaveScreenEnabled ? '/leave' : '');
raviteja83 marked this conversation as resolved.
Show resolved Hide resolved
navigate(leaveLocation);
ToastManager.clearAllToast();
}, 2000);
}, 1000);
break;
case HMSNotificationTypes.DEVICE_CHANGE_UPDATE:
ToastManager.addToast({
Expand Down
Loading