j-ro / BusTrackDC-old

An app for iOS and Android to find out when your Metro or Circulator bus or Metro train is coming to a stop near you, using WMATA and NextBus prediction data.
http://bustrackdc.com
18 stars 8 forks source link

Refresh for bus arrival times #27

Closed j-ro closed 11 years ago

j-ro commented 11 years ago

Now that arrival times are their own page on the stop detail view, a refresh function would be great.

Ideally this would be pull to refresh, but a refresh button could work just as well.

stuartjmoore commented 11 years ago

Since the bus times are in minutes, you could just set a timer that decrements the times by one every minute. Not as correct, but still more accurate than not updating. Possible update via a web call once every five minutes.

j-ro commented 11 years ago

I'm not sure how javascript timers work when the app is sleeping. If we're thinking of use cases, it's unlikely someone would keep the screen open and alive for minutes at a time. Rather, they'd open the app, check the times, close it and do something else, and then come back later in a few minutes and check again.

So I think pull to refresh is one solution, and maybe the other is to autorefresh on app load. So if you close the app when viewing a detail screen and re-open it, it would refresh the times on re-open. And then if you wanted an additional refresh, you could pull to refresh.

j-ro commented 11 years ago

Did the pull to refresh so far. One note -- the scroll bouncing isn't quite natural (as I'm using iScroll for the functionality). It's hardly noticeable, especially because these lists don't tend to scroll a lot. But would be good to make that better in future versions...

Now on to the app sleeping stuff!

j-ro commented 11 years ago

And done! That was easy....

Fixed in version 1.1.1