sirbrillig/voyageur — pull request #7 by sirbrillig (2014-08-29 20:55:06+00:00)
Title: Prevent distance flicker

The distance loading indicator flickers when a Triplocation is added or removed because after every modification to the Trip, a call is made to `TriplocationsStore.fetch()` in order to make sure the data is synchronized correctly, and this second call then calls `Trip.getTrip()`. That is, if the trip was changed on the server sometime since the last sync, this will make sure it's all accurate. However, when nothing has changed, it causes an unnecessary call to `Trip.showPending()`, showing up as a flicker.

This change prevents a `change` event from being triggered on `TriplocationStore` when an update doesn't change the trip (triplocation IDs may change, but those are not relevant to the user), preventing the call to `Trip.getTrip()` and the flicker.