diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift index 992a56d..ea3adf4 100644 --- a/WireGuard/WireGuard/UI/TunnelViewModel.swift +++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift @@ -455,17 +455,17 @@ extension TunnelViewModel { switch (activateOnDemandOption) { case .none: return "" - case .useOnDemandOverWifiOrCellular: - return "Over wifi or cellular" - case .useOnDemandOverWifiOnly: - return "Over wifi only" + case .useOnDemandOverWiFiOrCellular: + return "Over WiFi or cellular" + case .useOnDemandOverWiFiOnly: + return "Over WiFi only" case .useOnDemandOverCellularOnly: return "Over cellular only" } } func defaultActivateOnDemandOption() -> ActivateOnDemandOption { - return .useOnDemandOverWifiOrCellular + return .useOnDemandOverWiFiOrCellular } } diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift index ffefa33..5e1727f 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift @@ -436,10 +436,10 @@ class TunnelDetailTableViewActivateOnDemandCell: UITableViewCell { switch (activateOnDemandSetting.activateOnDemandOption) { case .none: detailText = "Off" - case .useOnDemandOverWifiOrCellular: - detailText = "Wifi or cellular" - case .useOnDemandOverWifiOnly: - detailText = "Wifi only" + case .useOnDemandOverWiFiOrCellular: + detailText = "WiFi or cellular" + case .useOnDemandOverWiFiOnly: + detailText = "WiFi only" case .useOnDemandOverCellularOnly: detailText = "Cellular only" } diff --git a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift index f18fb14..74c6e57 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift @@ -27,8 +27,8 @@ class TunnelEditTableViewController: UITableViewController { ] let activateOnDemandOptions: [ActivateOnDemandOption] = [ - .useOnDemandOverWifiOrCellular, - .useOnDemandOverWifiOnly, + .useOnDemandOverWiFiOrCellular, + .useOnDemandOverWiFiOnly, .useOnDemandOverCellularOnly ] diff --git a/WireGuard/WireGuard/VPN/ActivateOnDemandSetting.swift b/WireGuard/WireGuard/VPN/ActivateOnDemandSetting.swift index a2cbe00..10a9c0b 100644 --- a/WireGuard/WireGuard/VPN/ActivateOnDemandSetting.swift +++ b/WireGuard/WireGuard/VPN/ActivateOnDemandSetting.swift @@ -10,8 +10,8 @@ struct ActivateOnDemandSetting { enum ActivateOnDemandOption { case none // Valid only when isActivateOnDemandEnabled is false - case useOnDemandOverWifiOrCellular - case useOnDemandOverWifiOnly + case useOnDemandOverWiFiOrCellular + case useOnDemandOverWiFiOnly case useOnDemandOverCellularOnly } @@ -24,9 +24,9 @@ extension ActivateOnDemandSetting { switch (activateOnDemandOption) { case .none: rules = nil - case .useOnDemandOverWifiOrCellular: + case .useOnDemandOverWiFiOrCellular: rules = [connectRule] - case .useOnDemandOverWifiOnly: + case .useOnDemandOverWiFiOnly: connectRule.interfaceTypeMatch = .wiFi disconnectRule.interfaceTypeMatch = .cellular rules = [connectRule, disconnectRule] @@ -47,12 +47,12 @@ extension ActivateOnDemandSetting { case 1: let rule = rules[0] precondition(rule.action == .connect) - activateOnDemandOption = .useOnDemandOverWifiOrCellular + activateOnDemandOption = .useOnDemandOverWiFiOrCellular case 2: let connectRule = rules.first(where: { $0.action == .connect })! let disconnectRule = rules.first(where: { $0.action == .disconnect })! if (connectRule.interfaceTypeMatch == .wiFi && disconnectRule.interfaceTypeMatch == .cellular) { - activateOnDemandOption = .useOnDemandOverWifiOnly + activateOnDemandOption = .useOnDemandOverWiFiOnly } else if (connectRule.interfaceTypeMatch == .cellular && disconnectRule.interfaceTypeMatch == .wiFi) { activateOnDemandOption = .useOnDemandOverCellularOnly } else {