Skip to content

Commit d93c3a5

Browse files
committed
Merge branch 'stop-filtering-edit-view-of-custuom-lists'
2 parents 0eb0832 + a5980da commit d93c3a5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift

+8-6
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,10 @@ final class LocationViewController: UIViewController {
130130
// MARK: - Private
131131

132132
private func setUpDataSources() {
133-
let allLocationDataSource = AllLocationDataSource()
134-
let customListsDataSource = CustomListsDataSource(repository: customListRepository)
135-
136133
dataSource = LocationDataSource(
137134
tableView: tableView,
138-
allLocations: allLocationDataSource,
139-
customLists: customListsDataSource
135+
allLocations: AllLocationDataSource(),
136+
customLists: CustomListsDataSource(repository: customListRepository)
140137
)
141138

142139
dataSource?.didSelectRelayLocations = { [weak self] locations in
@@ -145,7 +142,12 @@ final class LocationViewController: UIViewController {
145142

146143
dataSource?.didTapEditCustomLists = { [weak self] in
147144
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+
}
149151
}
150152

151153
if let cachedRelays {

0 commit comments

Comments
 (0)