diff options
| author | Jon Petersson <jon.petersson@kvadrat.se> | 2024-05-02 11:27:26 +0200 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2024-05-02 16:24:08 +0200 |
| commit | a5980da67842f38b8f5a0cdd696feb87f2b56fa7 (patch) | |
| tree | 9e09da417068a387cbb40a453d99bd5ab95ce77c | |
| parent | 0eb08329ca692f831b603252d00bad4604a05f18 (diff) | |
| download | mullvadvpn-a5980da67842f38b8f5a0cdd696feb87f2b56fa7.tar.xz mullvadvpn-a5980da67842f38b8f5a0cdd696feb87f2b56fa7.zip | |
Stop filtering edit view of custom lists
| -rw-r--r-- | ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift index 6d82f5e1b9..a8bd63f1c2 100644 --- a/ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift +++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationViewController.swift @@ -130,13 +130,10 @@ final class LocationViewController: UIViewController { // MARK: - Private private func setUpDataSources() { - let allLocationDataSource = AllLocationDataSource() - let customListsDataSource = CustomListsDataSource(repository: customListRepository) - dataSource = LocationDataSource( tableView: tableView, - allLocations: allLocationDataSource, - customLists: customListsDataSource + allLocations: AllLocationDataSource(), + customLists: CustomListsDataSource(repository: customListRepository) ) dataSource?.didSelectRelayLocations = { [weak self] locations in @@ -145,7 +142,12 @@ final class LocationViewController: UIViewController { dataSource?.didTapEditCustomLists = { [weak self] in guard let self else { return } - delegate?.didRequestRouteToCustomLists(self, nodes: allLocationDataSource.nodes) + + if let cachedRelays { + let allLocationDataSource = AllLocationDataSource() + allLocationDataSource.reload(cachedRelays.relays, relays: cachedRelays.relays.wireguard.relays) + delegate?.didRequestRouteToCustomLists(self, nodes: allLocationDataSource.nodes) + } } if let cachedRelays { |
