thoughtbot / Tropos

Weather and Forecasts for Humans
troposweather.com
MIT License
1.51k stars 201 forks source link

Fix stale notification #190

Closed klaaspieter closed 8 years ago

klaaspieter commented 8 years ago

By consolidating all calls to weatherCommand execute in the AppDelegate it becomes much easier to reason about when the command is executing. This made it easier to figure out at which times in the launch cycle we to execute it and how to prevent the command being executed multiple times.

The weather is currently updated when:

The first two replace the weather updates in WeatherViewController in response to viewDidLoad and UIApplicationWillEnterForegroundNotification. By moving this into the app delegate we can more easily detect when the application is launched by a remote notification and prevent any weather updates normally done to update the UI.

This PR resolves #184.

klaaspieter commented 8 years ago

I'm going to merge this so I can release it in a beta.