From 64828f69ed57ea9b02aba037997efb4d41d3a2b2 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 17 Dec 2024 16:20:22 +0100 Subject: [PATCH] Reconnect when disabling split tunneling from dialog --- .../mullvad-vpn/src/renderer/components/NotificationArea.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx index 20b001f0959e..df3c78d4b063 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx @@ -46,7 +46,7 @@ interface IProps { } export default function NotificationArea(props: IProps) { - const { showFullDiskAccessSettings } = useAppContext(); + const { showFullDiskAccessSettings, reconnectTunnel } = useAppContext(); const account = useSelector((state: IReduxState) => state.account); const locale = useSelector((state: IReduxState) => state.userInterface.locale); @@ -80,7 +80,8 @@ export default function NotificationArea(props: IProps) { const disableSplitTunneling = useCallback(async () => { setIsModalOpen(false); await setSplitTunnelingState(false); - }, [setSplitTunnelingState]); + await reconnectTunnel(); + }, [reconnectTunnel, setSplitTunnelingState]); const notificationProviders: InAppNotificationProvider[] = [ new ConnectingNotificationProvider({ tunnelState }),