Commit b49daf0d by Demid Merzlyakov

Fix use current location bug on Locations screen.

parent 82fc54c7
...@@ -213,7 +213,10 @@ public class LocationsViewModel { ...@@ -213,7 +213,10 @@ public class LocationsViewModel {
locationManager.useCurrentLocation(presentDialogsIn: viewController) { [weak self] (result: LocationManager.LocationRequestResult) in locationManager.useCurrentLocation(presentDialogsIn: viewController) { [weak self] (result: LocationManager.LocationRequestResult) in
switch result { switch result {
case .success: case .success:
// we'll get a location via a different callback, viewModelDidSelectCity will be called, and the ViewController will close. DispatchQueue.main.async {
guard let self = self else { return }
self.delegate?.viewModelDidSelectCity(model: self)
}
break break
case .useSearch: case .useSearch:
// do nothing, we're already in Search // do nothing, we're already in Search
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment