OneBusAway / onebusaway-ios

OneBusAway for iOS, written in Swift.
Other
76 stars 32 forks source link

Time estimate does not update when in detailed route view #668

Closed mulroony closed 1 year ago

mulroony commented 1 year ago

If you go to the detailed view of a particular route (select a bus & then select the next available time, the view that shows all the stops and real-time tracking of the bus). The time estimate, circled in red, does not seem to update if you stay on that screen even if refresh is clicked. Going back and then returning to that screen updates it.

This is on the iOS app, 23.2.3, iOS 16.4.1.

IMG_6942

Miniland1333 commented 1 year ago

I did a quick test in the app, and it looks like this bug affects all the data in the floating panel.

I wonder if the isLoadedAndOnScreen is perhaps what is preventing the tripDetails from updating. https://github.com/OneBusAway/onebusaway-ios/blob/2fd7522a2b2f8b5f6e1e92f571ca9923731fbd12/OBAKit/Trip/TripFloatingPanelController.swift#L23-L29

If the bug isn't here, then it may be earlier during the refresh such as in: https://github.com/OneBusAway/onebusaway-ios/blob/2fd7522a2b2f8b5f6e1e92f571ca9923731fbd12/OBAKit/Trip/TripViewController.swift#L286-L336

ualch9 commented 1 year ago

it looks like this bug affects all the data in the floating panel.

I haven't been able to reproduce this on the entire floating panel, listView.applyData(animated:false) is being hit every time I reload.

Otherwise, I've put up a PR with a fix for the original issue. I'll have it up as a minor version bump on the TestFlight soon.

Miniland1333 commented 1 year ago

I've been testing this new version in testflight and it does appear to be fixed! Thanks for solving this issue!

ualch9 commented 1 year ago

Awesome to hear, thank you for taking the time to reply!