Removed SetTunnelStatus

Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
This commit is contained in:
Alessio Nossa
2023-04-01 16:00:24 +02:00
parent c29787f898
commit 63c09565f2
7 changed files with 4 additions and 452 deletions
@@ -388,18 +388,6 @@ extension TunnelDetailTableViewController {
cell.onSwitchToggled = { [weak self] isOn in
guard let self = self else { return }
let intent = SetTunnelStatusIntent()
intent.tunnel = self.tunnel.name
intent.operation = .turn
intent.state = isOn ? .on : .off
let interaction = INInteraction(intent: intent, response: nil)
interaction.groupIdentifier = "com.wireguard.intents.tunnel.\(self.tunnel.name)"
interaction.donate { error in
if let error = error {
wg_log(.error, message: "Error donating interaction for SetTunnelStatusIntent: \(error.localizedDescription)")
}
}
if self.tunnel.hasOnDemandRules {
self.tunnelsManager.setOnDemandEnabled(isOn, on: self.tunnel) { error in
if error == nil && !isOn {