From c1363c49fe3185695beb36a2ae813e68abfafba6 Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Sat, 7 Sep 2024 10:13:39 +0200 Subject: [PATCH] feat(shortcuts): update AppIntentsHandler.swift --- .../Scenes/MainScreen/AppIntentsHandler.swift | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/IVPNClient/Scenes/MainScreen/AppIntentsHandler.swift b/IVPNClient/Scenes/MainScreen/AppIntentsHandler.swift index 9e25095a..be2e035e 100644 --- a/IVPNClient/Scenes/MainScreen/AppIntentsHandler.swift +++ b/IVPNClient/Scenes/MainScreen/AppIntentsHandler.swift @@ -13,23 +13,11 @@ extension MainViewController { // MARK: - App Intents - @objc func intentConnect() { - DispatchQueue.delay(0.75) { - if UserDefaults.shared.networkProtectionEnabled { - Application.shared.connectionManager.resetRulesAndConnectShortcut(closeApp: true, actionType: .connect) - return - } - Application.shared.connectionManager.connect() - } + Application.shared.connectionManager.resetRulesAndConnect() } @objc func intentDisconnect() { - DispatchQueue.delay(0.75) { - if UserDefaults.shared.networkProtectionEnabled { - Application.shared.connectionManager.resetRulesAndDisconnectShortcut(closeApp: true, actionType: .disconnect) - return - } - Application.shared.connectionManager.disconnect() - } + Application.shared.connectionManager.resetRulesAndDisconnect() } @objc func intentAntiTrackerEnable() {