Commit cab0b358 by Demid Merzlyakov

LocationManager: fix completion handler of updateWeather.

parent 4a1ea7ce
...@@ -428,8 +428,9 @@ public class LocationManager { ...@@ -428,8 +428,9 @@ public class LocationManager {
if let updatedLocation = updatedLocation { if let updatedLocation = updatedLocation {
self.log.info("Update weather finished for \(location)") self.log.info("Update weather finished for \(location)")
self.makeChanges(to: location, in: "weather") { (oldLocation) -> Location in self.makeChanges(to: location, in: "weather") { (oldLocation) -> Location in
completion?(updatedLocation) let merged = oldLocation.mergedWith(incrementalChanges: updatedLocation)
return oldLocation.mergedWith(incrementalChanges: updatedLocation) completion?(merged)
return merged
} }
} }
else { else {
......
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