1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-16 07:20:16 -07:00

fix reject connection bug

This commit is contained in:
Pavlo Buidenkov 2022-06-01 00:31:52 +02:00
parent f3c914587f
commit 072c389b3e
2 changed files with 4 additions and 7 deletions

View File

@ -65,7 +65,6 @@ const ScanQRStep: React.FC = () => {
);
if (roomId) {
setRoomID(roomId);
clearInterval(getRoomIdInterval);
}
}, 1000);

View File

@ -174,6 +174,7 @@ const DeskreenStepper = React.forwardRef((_props, ref) => {
setPendingConnectionDevice(null);
setIsUserAllowedConnection(false);
ipcRenderer.invoke(IpcEvents.ResetWaitingForConnectionSharingSession);
ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession);
}, []);
@ -186,14 +187,11 @@ const DeskreenStepper = React.forwardRef((_props, ref) => {
ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession);
}, []);
React.useImperativeHandle(ref, () => ({
handleReset() {
handleResetWithSharingSessionRestart();
},
}));
const handleCancelAlert = async () => {
setIsAlertOpen(false);
setActiveStep(0);
setPendingConnectionDevice(null);
setIsUserAllowedConnection(false);
ipcRenderer.invoke(IpcEvents.ResetWaitingForConnectionSharingSession);
ipcRenderer.invoke(IpcEvents.CreateWaitingForConnectionSharingSession);