Skip to content

Commit 94b3526

Browse files
committed
Update multihop settings view with new list items
1 parent 5547a41 commit 94b3526

16 files changed

Lines changed: 84 additions & 233 deletions

File tree

ios/Assets/Localizable.xcstrings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40461,9 +40461,6 @@
4046140461
}
4046240462
}
4046340463
}
40464-
},
40465-
"Mode" : {
40466-
4046740464
},
4046840465
"Montreal" : {
4046940466
"localizations" : {

ios/MullvadREST/Relay/MultihopDecisionFlow.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ protocol MultihopDecisionFlow {
1515
func pick(
1616
entryCandidates: [RelayCandidate],
1717
exitCandidates: [RelayCandidate],
18-
selectCloseRelay: Bool
18+
selectNearbyLocation: Bool
1919
) throws -> SelectedRelays
2020
}
2121

@@ -31,7 +31,7 @@ struct OneToOne: MultihopDecisionFlow {
3131
func pick(
3232
entryCandidates: [RelayCandidate],
3333
exitCandidates: [RelayCandidate],
34-
selectCloseRelay: Bool
34+
selectNearbyLocation: Bool
3535
) throws -> SelectedRelays {
3636
guard canHandle(entryCandidates: entryCandidates, exitCandidates: exitCandidates) else {
3737
guard let next else {
@@ -40,7 +40,7 @@ struct OneToOne: MultihopDecisionFlow {
4040
return try next.pick(
4141
entryCandidates: entryCandidates,
4242
exitCandidates: exitCandidates,
43-
selectCloseRelay: selectCloseRelay
43+
selectNearbyLocation: selectNearbyLocation
4444
)
4545
}
4646

@@ -51,7 +51,7 @@ struct OneToOne: MultihopDecisionFlow {
5151
let exitMatch = try relayPicker.findBestMatch(from: exitCandidates, applyObfuscation: false)
5252
let entryMatch = try relayPicker.findBestMatch(
5353
from: entryCandidates,
54-
closeTo: selectCloseRelay ? exitMatch.location : nil,
54+
closeTo: selectNearbyLocation ? exitMatch.location : nil,
5555
applyObfuscation: true,
5656
forceV4: true,
5757
)
@@ -80,7 +80,7 @@ struct OneToMany: MultihopDecisionFlow {
8080
func pick(
8181
entryCandidates: [RelayCandidate],
8282
exitCandidates: [RelayCandidate],
83-
selectCloseRelay: Bool
83+
selectNearbyLocation: Bool
8484
) throws -> SelectedRelays {
8585
guard let multihopPicker = relayPicker as? MultihopPicker else {
8686
fatalError("Could not cast picker to MultihopPicker")
@@ -93,7 +93,7 @@ struct OneToMany: MultihopDecisionFlow {
9393
return try next.pick(
9494
entryCandidates: entryCandidates,
9595
exitCandidates: exitCandidates,
96-
selectCloseRelay: selectCloseRelay
96+
selectNearbyLocation: selectNearbyLocation
9797
)
9898
}
9999

@@ -129,7 +129,7 @@ struct ManyToOne: MultihopDecisionFlow {
129129
func pick(
130130
entryCandidates: [RelayCandidate],
131131
exitCandidates: [RelayCandidate],
132-
selectCloseRelay: Bool
132+
selectNearbyLocation: Bool
133133
) throws -> SelectedRelays {
134134
guard let multihopPicker = relayPicker as? MultihopPicker else {
135135
fatalError("Could not cast picker to MultihopPicker")
@@ -142,7 +142,7 @@ struct ManyToOne: MultihopDecisionFlow {
142142
return try next.pick(
143143
entryCandidates: entryCandidates,
144144
exitCandidates: exitCandidates,
145-
selectCloseRelay: selectCloseRelay
145+
selectNearbyLocation: selectNearbyLocation
146146
)
147147
}
148148

@@ -154,7 +154,7 @@ struct ManyToOne: MultihopDecisionFlow {
154154
let entryMatch = try multihopPicker.exclude(
155155
relay: exitMatch,
156156
from: entryCandidates,
157-
closeTo: selectCloseRelay ? exitMatch.location : nil,
157+
closeTo: selectNearbyLocation ? exitMatch.location : nil,
158158
applyObfuscation: true
159159
)
160160

@@ -182,7 +182,7 @@ struct ManyToMany: MultihopDecisionFlow {
182182
func pick(
183183
entryCandidates: [RelayCandidate],
184184
exitCandidates: [RelayCandidate],
185-
selectCloseRelay: Bool
185+
selectNearbyLocation: Bool
186186
) throws -> SelectedRelays {
187187
guard let multihopPicker = relayPicker as? MultihopPicker else {
188188
fatalError("Could not cast picker to MultihopPicker")
@@ -195,15 +195,15 @@ struct ManyToMany: MultihopDecisionFlow {
195195
return try next.pick(
196196
entryCandidates: entryCandidates,
197197
exitCandidates: exitCandidates,
198-
selectCloseRelay: selectCloseRelay
198+
selectNearbyLocation: selectNearbyLocation
199199
)
200200
}
201201

202202
let exitMatch = try multihopPicker.findBestMatch(from: exitCandidates, applyObfuscation: false, forceV4: true)
203203
let entryMatch = try multihopPicker.exclude(
204204
relay: exitMatch,
205205
from: entryCandidates,
206-
closeTo: selectCloseRelay ? exitMatch.location : nil,
206+
closeTo: selectNearbyLocation ? exitMatch.location : nil,
207207
applyObfuscation: true
208208
)
209209

ios/MullvadREST/Relay/RelayPicking/MultihopPicker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct MultihopPicker: RelayPicking {
8383
return try decisionFlow.pick(
8484
entryCandidates: entryCandidates,
8585
exitCandidates: exitCandidates,
86-
selectCloseRelay: daitaSettings.isAutomaticRouting || (constraints.entryLocations == .any)
86+
selectNearbyLocation: daitaSettings.isAutomaticRouting || (constraints.entryLocations == .any)
8787
)
8888
}
8989

ios/MullvadVPN.xcodeproj/project.pbxproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@
481481
7A28826A2BA8336600FD9F20 /* VPNSettingsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2882692BA8336600FD9F20 /* VPNSettingsCoordinator.swift */; };
482482
7A2917F62F606D7C001E5DB6 /* BreadcrumbsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917F52F606D76001E5DB6 /* BreadcrumbsProvider.swift */; };
483483
7A2917FB2F606F58001E5DB6 /* SettingsNavigationRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917F92F606F48001E5DB6 /* SettingsNavigationRoute.swift */; };
484-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */; };
485484
7A2960F62A963F7500389B82 /* AlertCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2960F52A963F7500389B82 /* AlertCoordinator.swift */; };
486485
7A2960FD2A964BB700389B82 /* AlertPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2960FC2A964BB700389B82 /* AlertPresentation.swift */; };
487486
7A2C0E8C2D8B13F0003D8048 /* MullvadAPIProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2C0E8B2D8B13E8003D8048 /* MullvadAPIProxy.swift */; };
@@ -546,7 +545,6 @@
546545
7A5869C32B5820CE00640D27 /* IPOverrideRepositoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C22B5820CE00640D27 /* IPOverrideRepositoryTests.swift */; };
547546
7A5869C52B5A899C00640D27 /* MethodSettingsCellConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C42B5A899C00640D27 /* MethodSettingsCellConfiguration.swift */; };
548547
7A5869C72B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C62B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift */; };
549-
7A5D46A12F630D4E0014314C /* AutomaticRelayItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */; };
550548
7A6000F62B60092F001CF0D9 /* AccessMethodViewModelEditing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6000F52B60092F001CF0D9 /* AccessMethodViewModelEditing.swift */; };
551549
7A6000F92B6273A4001CF0D9 /* AccessMethodViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 586C0D7B2B03BDD100E7CDD7 /* AccessMethodViewModel.swift */; };
552550
7A6000FC2B628DF6001CF0D9 /* ListCellContentConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6000FB2B628DF6001CF0D9 /* ListCellContentConfiguration.swift */; };
@@ -2164,7 +2162,6 @@
21642162
7A2882692BA8336600FD9F20 /* VPNSettingsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNSettingsCoordinator.swift; sourceTree = "<group>"; };
21652163
7A2917F52F606D76001E5DB6 /* BreadcrumbsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbsProvider.swift; sourceTree = "<group>"; };
21662164
7A2917F92F606F48001E5DB6 /* SettingsNavigationRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsNavigationRoute.swift; sourceTree = "<group>"; };
2167-
7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedListItemOLD.swift; sourceTree = "<group>"; };
21682165
7A2960F52A963F7500389B82 /* AlertCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertCoordinator.swift; sourceTree = "<group>"; };
21692166
7A2960FC2A964BB700389B82 /* AlertPresentation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresentation.swift; sourceTree = "<group>"; };
21702167
7A2C0E8B2D8B13E8003D8048 /* MullvadAPIProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MullvadAPIProxy.swift; sourceTree = "<group>"; };
@@ -2212,7 +2209,6 @@
22122209
7A5869C22B5820CE00640D27 /* IPOverrideRepositoryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPOverrideRepositoryTests.swift; sourceTree = "<group>"; };
22132210
7A5869C42B5A899C00640D27 /* MethodSettingsCellConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MethodSettingsCellConfiguration.swift; sourceTree = "<group>"; };
22142211
7A5869C62B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MethodSettingsDataSourceConfiguration.swift; sourceTree = "<group>"; };
2215-
7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomaticRelayItemView.swift; sourceTree = "<group>"; };
22162212
7A6000F52B60092F001CF0D9 /* AccessMethodViewModelEditing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessMethodViewModelEditing.swift; sourceTree = "<group>"; };
22172213
7A6000FB2B628DF6001CF0D9 /* ListCellContentConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCellContentConfiguration.swift; sourceTree = "<group>"; };
22182214
7A6000FD2B628E9F001CF0D9 /* ListCellContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCellContentView.swift; sourceTree = "<group>"; };
@@ -3522,7 +3518,6 @@
35223518
F90A988D2E13C5490020F64F /* MullvadSecondaryTextField.swift */,
35233519
F95CDDA72EE07F7F000E9D97 /* PressedExposingButton.swift */,
35243520
7A8A190F2CEE3918000BCB5B /* RowSeparator.swift */,
3525-
7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */,
35263521
58F19E34228C15BA00C7710B /* SpinnerActivityIndicatorView.swift */,
35273522
7AA130A02D01B1E200640DF9 /* SplitMainButton.swift */,
35283523
E1FD0DF428AA7CE400299DB4 /* StatusActivityView.swift */,
@@ -5057,7 +5052,6 @@
50575052
children = (
50585053
F95CDD9C2EE02A65000E9D97 /* MultihopSelection */,
50595054
F92C65892E7A922F00B8E107 /* ActiveFilterView.swift */,
5060-
7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */,
50615055
F9C579BC2E8E9ADE00C90C50 /* DaitaWarningView.swift */,
50625056
F96D04EC2EC318D8004A4D48 /* EntryLocationView.swift */,
50635057
F96D04E82EC317B9004A4D48 /* ExitLocationView.swift */,
@@ -6478,7 +6472,6 @@
64786472
7A3353932AAA089000F0A71C /* SimulatorTunnelInfo.swift in Sources */,
64796473
7A5869AB2B55527C00640D27 /* IPOverrideCoordinator.swift in Sources */,
64806474
5867771429097BCD006F721F /* PaymentState.swift in Sources */,
6481-
7A5D46A12F630D4E0014314C /* AutomaticRelayItemView.swift in Sources */,
64826475
7AC8A3AF2ABC71D600DC4939 /* TermsOfServiceCoordinator.swift in Sources */,
64836476
7A8A191A2CEF41AF000BCB5B /* GroupedRowView.swift in Sources */,
64846477
58FF9FE22B075BA600E4C97D /* EditAccessMethodSectionIdentifier.swift in Sources */,
@@ -6619,8 +6612,6 @@
66196612
586C0D872B03D39600E7CDD7 /* AccessMethodCellReuseIdentifier.swift in Sources */,
66206613
F95CDDA22EE03052000E9D97 /* MultihopLabel.swift in Sources */,
66216614
7AFF5B9E2F6007A70088028F /* InvalidShadowsocksCipherInAppNotificationProvider.swift in Sources */,
6622-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */,
6623-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */,
66246615
7A9CCCBD2A96302800DD6A34 /* LoginCoordinator.swift in Sources */,
66256616
7A7B3AB62C6DE4DA00D4BCCE /* RestorePurchasesView.swift in Sources */,
66266617
7A0EAE9E2D01BCBF00D3EB8B /* View+Size.swift in Sources */,

ios/MullvadVPN.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)