Skip to content

Commit

Permalink
Fix UI tests and Make connection view releasable
Browse files Browse the repository at this point in the history
  • Loading branch information
rablador committed Jan 16, 2025
1 parent f7aef11 commit e004028
Show file tree
Hide file tree
Showing 28 changed files with 187 additions and 1,143 deletions.
38 changes: 7 additions & 31 deletions ios/MullvadVPN.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public enum AccessibilityIdentifier: Equatable {
case connectionPanelInAddressRow
case connectionPanelOutAddressRow
case connectionPanelOutIpv6AddressRow
case connectionPanelServerLabel
case customSwitch
case customWireGuardPortTextField
case dnsContentBlockersHeaderView
Expand Down
10 changes: 0 additions & 10 deletions ios/MullvadVPN/Coordinators/TunnelCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ import UIKit

class TunnelCoordinator: Coordinator, Presenting {
private let tunnelManager: TunnelManager

#if DEBUG
private let controller: FI_TunnelViewController
#else
private let controller: TunnelViewController
#endif

private var tunnelObserver: TunnelObserver?

var presentationContext: UIViewController {
Expand All @@ -44,11 +38,7 @@ class TunnelCoordinator: Coordinator, Presenting {
ipOverrideRepository: ipOverrideRepository
)

#if DEBUG
controller = FI_TunnelViewController(interactor: interactor)
#else
controller = TunnelViewController(interactor: interactor)
#endif

super.init()

Expand Down
329 changes: 0 additions & 329 deletions ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ConnectionViewViewModel: ObservableObject {
case selectLocation
}

@Published var tunnelStatus: TunnelStatus
@Published private(set) var tunnelStatus: TunnelStatus
@Published var outgoingConnectionInfo: OutgoingConnectionInfo?
@Published var showsActivityIndicator = false

Expand All @@ -46,6 +46,14 @@ class ConnectionViewViewModel: ObservableObject {
init(tunnelStatus: TunnelStatus) {
self.tunnelStatus = tunnelStatus
}

func update(tunnelStatus: TunnelStatus) {
self.tunnelStatus = tunnelStatus

if !tunnelIsConnected {
outgoingConnectionInfo = nil
}
}
}

extension ConnectionViewViewModel {
Expand Down
Loading

0 comments on commit e004028

Please sign in to comment.