File tree 1 file changed +4
-6
lines changed
ios/MullvadREST/Transport
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,12 @@ class AccessMethodIterator {
37
37
}
38
38
39
39
private func refreshCacheIfNeeded( ) {
40
- /// Validating the index of `lastReachableApiAccessCache` after any changes in `AccessMethodRepository`
41
- if let firstIndex = enabledConfigurations. firstIndex ( where: { $0. id == self . lastReachableApiAccessId } ) {
40
+ // Validating the index of `lastReachableApiAccessCache` after any changes in `AccessMethodRepository`
41
+ if let firstIndex = enabledConfigurations. firstIndex ( where: { $0. id == lastReachableApiAccessId } ) {
42
42
index = firstIndex
43
- } else {
44
- /// When `firstIndex` is `nil`, that means the current configuration is not valid anymore
45
- /// Invalidating cache by replacing the `current` to the next enabled access method
46
- dataSource. saveLastReachable ( pick ( ) )
47
43
}
44
+
45
+ dataSource. saveLastReachable ( pick ( ) )
48
46
}
49
47
50
48
func rotate( ) {
You can’t perform that action at this time.
0 commit comments