mozilla-mobile / prox

[INACTIVE] A search and discovery app for the "here & now". We're experimenting with ideas on mobile that can better surface content from the open web.
https://wiki.mozilla.org/New_Mobile_Experience
Mozilla Public License 2.0
22 stars 12 forks source link

Closes #543: add timeout when calculating travel ETAs #616

Closed thebnich closed 7 years ago

thebnich commented 7 years ago

I found that MKDirections.calculateETA simply isn't executing its callback at all, which seems like an iOS bug. I added a delayed dispatch on the main thread to see if maybe the main thread is deadlocked and we're seeing this as a side effect, but the dispatched callback executes just fine after the app freezes.

Was originally going to sort by raw distance and update the walking distance only as the cards are shown, but that would slightly reorder the cards, which is risky given the closeness to Chicago. Adding a timeout is probably the safest bet for now since it doesn't change the experience.

thebnich commented 7 years ago

Only major concern \<snip>

Then I think those places will be put at the end of the list, unsorted (which I think is what happens now when MKDirections.calculateETA starts throwing errors). I'm looking into a fix that tries to use raw distance as a fallback to make this better, but it's more complicated than expected, so I'll land that as a follow-up.