Skip to content

Commit

Permalink
Stop filtering edit view of custom lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Petersson authored and pinkisemils committed May 2, 2024
1 parent 0eb0832 commit a5980da
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit a5980da

Please sign in to comment.