Skip to content

Commit 7c8b2e4

Browse files
committed
Update multihop settings view with new list items
1 parent 42a4fed commit 7c8b2e4

File tree

16 files changed

+84
-233
lines changed

16 files changed

+84
-233
lines changed

ios/Assets/Localizable.xcstrings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36427,9 +36427,6 @@
3642736427
}
3642836428
}
3642936429
}
36430-
},
36431-
"Mode" : {
36432-
3643336430
},
3643436431
"Montreal" : {
3643536432
"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
)
5757

@@ -79,7 +79,7 @@ struct OneToMany: MultihopDecisionFlow {
7979
func pick(
8080
entryCandidates: [RelayCandidate],
8181
exitCandidates: [RelayCandidate],
82-
selectCloseRelay: Bool
82+
selectNearbyLocation: Bool
8383
) throws -> SelectedRelays {
8484
guard let multihopPicker = relayPicker as? MultihopPicker else {
8585
fatalError("Could not cast picker to MultihopPicker")
@@ -92,7 +92,7 @@ struct OneToMany: MultihopDecisionFlow {
9292
return try next.pick(
9393
entryCandidates: entryCandidates,
9494
exitCandidates: exitCandidates,
95-
selectCloseRelay: selectCloseRelay
95+
selectNearbyLocation: selectNearbyLocation
9696
)
9797
}
9898

@@ -127,7 +127,7 @@ struct ManyToOne: MultihopDecisionFlow {
127127
func pick(
128128
entryCandidates: [RelayCandidate],
129129
exitCandidates: [RelayCandidate],
130-
selectCloseRelay: Bool
130+
selectNearbyLocation: Bool
131131
) throws -> SelectedRelays {
132132
guard let multihopPicker = relayPicker as? MultihopPicker else {
133133
fatalError("Could not cast picker to MultihopPicker")
@@ -140,7 +140,7 @@ struct ManyToOne: MultihopDecisionFlow {
140140
return try next.pick(
141141
entryCandidates: entryCandidates,
142142
exitCandidates: exitCandidates,
143-
selectCloseRelay: selectCloseRelay
143+
selectNearbyLocation: selectNearbyLocation
144144
)
145145
}
146146

@@ -151,7 +151,7 @@ struct ManyToOne: MultihopDecisionFlow {
151151
let entryMatch = try multihopPicker.exclude(
152152
relay: exitMatch,
153153
from: entryCandidates,
154-
closeTo: selectCloseRelay ? exitMatch.location : nil,
154+
closeTo: selectNearbyLocation ? exitMatch.location : nil,
155155
applyObfuscation: true
156156
)
157157

@@ -179,7 +179,7 @@ struct ManyToMany: MultihopDecisionFlow {
179179
func pick(
180180
entryCandidates: [RelayCandidate],
181181
exitCandidates: [RelayCandidate],
182-
selectCloseRelay: Bool
182+
selectNearbyLocation: Bool
183183
) throws -> SelectedRelays {
184184
guard let multihopPicker = relayPicker as? MultihopPicker else {
185185
fatalError("Could not cast picker to MultihopPicker")
@@ -192,15 +192,15 @@ struct ManyToMany: MultihopDecisionFlow {
192192
return try next.pick(
193193
entryCandidates: entryCandidates,
194194
exitCandidates: exitCandidates,
195-
selectCloseRelay: selectCloseRelay
195+
selectNearbyLocation: selectNearbyLocation
196196
)
197197
}
198198

199199
let exitMatch = try multihopPicker.findBestMatch(from: exitCandidates, applyObfuscation: false)
200200
let entryMatch = try multihopPicker.exclude(
201201
relay: exitMatch,
202202
from: entryCandidates,
203-
closeTo: selectCloseRelay ? exitMatch.location : nil,
203+
closeTo: selectNearbyLocation ? exitMatch.location : nil,
204204
applyObfuscation: true
205205
)
206206

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
@@ -467,7 +467,6 @@
467467
7A28826A2BA8336600FD9F20 /* VPNSettingsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2882692BA8336600FD9F20 /* VPNSettingsCoordinator.swift */; };
468468
7A2917F62F606D7C001E5DB6 /* BreadcrumbsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917F52F606D76001E5DB6 /* BreadcrumbsProvider.swift */; };
469469
7A2917FB2F606F58001E5DB6 /* SettingsNavigationRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917F92F606F48001E5DB6 /* SettingsNavigationRoute.swift */; };
470-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */; };
471470
7A2960F62A963F7500389B82 /* AlertCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2960F52A963F7500389B82 /* AlertCoordinator.swift */; };
472471
7A2960FD2A964BB700389B82 /* AlertPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2960FC2A964BB700389B82 /* AlertPresentation.swift */; };
473472
7A2C0E8C2D8B13F0003D8048 /* MullvadAPIProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A2C0E8B2D8B13E8003D8048 /* MullvadAPIProxy.swift */; };
@@ -532,7 +531,6 @@
532531
7A5869C32B5820CE00640D27 /* IPOverrideRepositoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C22B5820CE00640D27 /* IPOverrideRepositoryTests.swift */; };
533532
7A5869C52B5A899C00640D27 /* MethodSettingsCellConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C42B5A899C00640D27 /* MethodSettingsCellConfiguration.swift */; };
534533
7A5869C72B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5869C62B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift */; };
535-
7A5D46A12F630D4E0014314C /* AutomaticRelayItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */; };
536534
7A6000F62B60092F001CF0D9 /* AccessMethodViewModelEditing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6000F52B60092F001CF0D9 /* AccessMethodViewModelEditing.swift */; };
537535
7A6000F92B6273A4001CF0D9 /* AccessMethodViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 586C0D7B2B03BDD100E7CDD7 /* AccessMethodViewModel.swift */; };
538536
7A6000FC2B628DF6001CF0D9 /* ListCellContentConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6000FB2B628DF6001CF0D9 /* ListCellContentConfiguration.swift */; };
@@ -2089,7 +2087,6 @@
20892087
7A2882692BA8336600FD9F20 /* VPNSettingsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNSettingsCoordinator.swift; sourceTree = "<group>"; };
20902088
7A2917F52F606D76001E5DB6 /* BreadcrumbsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbsProvider.swift; sourceTree = "<group>"; };
20912089
7A2917F92F606F48001E5DB6 /* SettingsNavigationRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsNavigationRoute.swift; sourceTree = "<group>"; };
2092-
7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentedListItemOLD.swift; sourceTree = "<group>"; };
20932090
7A2960F52A963F7500389B82 /* AlertCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertCoordinator.swift; sourceTree = "<group>"; };
20942091
7A2960FC2A964BB700389B82 /* AlertPresentation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPresentation.swift; sourceTree = "<group>"; };
20952092
7A2C0E8B2D8B13E8003D8048 /* MullvadAPIProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MullvadAPIProxy.swift; sourceTree = "<group>"; };
@@ -2137,7 +2134,6 @@
21372134
7A5869C22B5820CE00640D27 /* IPOverrideRepositoryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPOverrideRepositoryTests.swift; sourceTree = "<group>"; };
21382135
7A5869C42B5A899C00640D27 /* MethodSettingsCellConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MethodSettingsCellConfiguration.swift; sourceTree = "<group>"; };
21392136
7A5869C62B5A8E4C00640D27 /* MethodSettingsDataSourceConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MethodSettingsDataSourceConfiguration.swift; sourceTree = "<group>"; };
2140-
7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomaticRelayItemView.swift; sourceTree = "<group>"; };
21412137
7A6000F52B60092F001CF0D9 /* AccessMethodViewModelEditing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessMethodViewModelEditing.swift; sourceTree = "<group>"; };
21422138
7A6000FB2B628DF6001CF0D9 /* ListCellContentConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCellContentConfiguration.swift; sourceTree = "<group>"; };
21432139
7A6000FD2B628E9F001CF0D9 /* ListCellContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCellContentView.swift; sourceTree = "<group>"; };
@@ -3444,7 +3440,6 @@
34443440
F90A988D2E13C5490020F64F /* MullvadSecondaryTextField.swift */,
34453441
F95CDDA72EE07F7F000E9D97 /* PressedExposingButton.swift */,
34463442
7A8A190F2CEE3918000BCB5B /* RowSeparator.swift */,
3447-
7A2917FC2F62CC17001E5DB6 /* SegmentedListItemOLD.swift */,
34483443
58F19E34228C15BA00C7710B /* SpinnerActivityIndicatorView.swift */,
34493444
7AA130A02D01B1E200640DF9 /* SplitMainButton.swift */,
34503445
E1FD0DF428AA7CE400299DB4 /* StatusActivityView.swift */,
@@ -4982,7 +4977,6 @@
49824977
children = (
49834978
F95CDD9C2EE02A65000E9D97 /* MultihopSelection */,
49844979
F92C65892E7A922F00B8E107 /* ActiveFilterView.swift */,
4985-
7A5D46A02F630D3A0014314C /* AutomaticRelayItemView.swift */,
49864980
F9C579BC2E8E9ADE00C90C50 /* DaitaWarningView.swift */,
49874981
F96D04EC2EC318D8004A4D48 /* EntryLocationView.swift */,
49884982
F96D04E82EC317B9004A4D48 /* ExitLocationView.swift */,
@@ -6423,7 +6417,6 @@
64236417
7A3353932AAA089000F0A71C /* SimulatorTunnelInfo.swift in Sources */,
64246418
7A5869AB2B55527C00640D27 /* IPOverrideCoordinator.swift in Sources */,
64256419
5867771429097BCD006F721F /* PaymentState.swift in Sources */,
6426-
7A5D46A12F630D4E0014314C /* AutomaticRelayItemView.swift in Sources */,
64276420
7AC8A3AF2ABC71D600DC4939 /* TermsOfServiceCoordinator.swift in Sources */,
64286421
7A8A191A2CEF41AF000BCB5B /* GroupedRowView.swift in Sources */,
64296422
58FF9FE22B075BA600E4C97D /* EditAccessMethodSectionIdentifier.swift in Sources */,
@@ -6564,8 +6557,6 @@
65646557
586C0D872B03D39600E7CDD7 /* AccessMethodCellReuseIdentifier.swift in Sources */,
65656558
F95CDDA22EE03052000E9D97 /* MultihopLabel.swift in Sources */,
65666559
7AFF5B9E2F6007A70088028F /* InvalidShadowsocksCipherInAppNotificationProvider.swift in Sources */,
6567-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */,
6568-
7A2917FD2F62CC29001E5DB6 /* SegmentedListItemOLD.swift in Sources */,
65696560
7A9CCCBD2A96302800DD6A34 /* LoginCoordinator.swift in Sources */,
65706561
7A7B3AB62C6DE4DA00D4BCCE /* RestorePurchasesView.swift in Sources */,
65716562
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)