Skip to content

Commit

Permalink
feat(shortcuts): update AppIntentsHandler.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajhilje committed Sep 7, 2024
1 parent e95f590 commit c1363c4
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions IVPNClient/Scenes/MainScreen/AppIntentsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c1363c4

Please sign in to comment.