Removed SetTunnelStatus
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
import UIKit
|
||||
import MobileCoreServices
|
||||
import UserNotifications
|
||||
import Intents
|
||||
|
||||
class TunnelsListTableViewController: UIViewController {
|
||||
|
||||
@@ -318,19 +317,6 @@ extension TunnelsListTableViewController: UITableViewDataSource {
|
||||
cell.tunnel = tunnel
|
||||
cell.onSwitchToggled = { [weak self] isOn in
|
||||
guard let self = self, let tunnelsManager = self.tunnelsManager else { return }
|
||||
|
||||
let intent = SetTunnelStatusIntent()
|
||||
intent.tunnel = tunnel.name
|
||||
intent.operation = .turn
|
||||
intent.state = isOn ? .on : .off
|
||||
let interaction = INInteraction(intent: intent, response: nil)
|
||||
interaction.groupIdentifier = "com.wireguard.intents.tunnel.\(tunnel.name)"
|
||||
interaction.donate { error in
|
||||
if let error = error {
|
||||
wg_log(.error, message: "Error donating interaction for SetTunnelStatusIntent: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
||||
if tunnel.hasOnDemandRules {
|
||||
tunnelsManager.setOnDemandEnabled(isOn, on: tunnel) { error in
|
||||
if error == nil && !isOn {
|
||||
|
||||
Reference in New Issue
Block a user