File tree 1 file changed +8
-6
lines changed
ios/MullvadVPN/View controllers/SelectLocation
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,10 @@ final class LocationViewController: UIViewController {
130
130
// MARK: - Private
131
131
132
132
private func setUpDataSources( ) {
133
- let allLocationDataSource = AllLocationDataSource ( )
134
- let customListsDataSource = CustomListsDataSource ( repository: customListRepository)
135
-
136
133
dataSource = LocationDataSource (
137
134
tableView: tableView,
138
- allLocations: allLocationDataSource ,
139
- customLists: customListsDataSource
135
+ allLocations: AllLocationDataSource ( ) ,
136
+ customLists: CustomListsDataSource ( repository : customListRepository )
140
137
)
141
138
142
139
dataSource? . didSelectRelayLocations = { [ weak self] locations in
@@ -145,7 +142,12 @@ final class LocationViewController: UIViewController {
145
142
146
143
dataSource? . didTapEditCustomLists = { [ weak self] in
147
144
guard let self else { return }
148
- delegate? . didRequestRouteToCustomLists ( self , nodes: allLocationDataSource. nodes)
145
+
146
+ if let cachedRelays {
147
+ let allLocationDataSource = AllLocationDataSource ( )
148
+ allLocationDataSource. reload ( cachedRelays. relays, relays: cachedRelays. relays. wireguard. relays)
149
+ delegate? . didRequestRouteToCustomLists ( self , nodes: allLocationDataSource. nodes)
150
+ }
149
151
}
150
152
151
153
if let cachedRelays {
You can’t perform that action at this time.
0 commit comments