Skip to content

Persistent Favorited Stops#78

Open
TheStaticBits wants to merge 1 commit intomaizebus-2.1from
persistent-favorite-stops
Open

Persistent Favorited Stops#78
TheStaticBits wants to merge 1 commit intomaizebus-2.1from
persistent-favorite-stops

Conversation

@TheStaticBits
Copy link
Copy Markdown
Member

Added a variable to track favorited stop markers (_displayedFavoriteStopMarkers) for persistent-displayed favorited stops. This is then updated alongside stop markers or whenever the user favorites/unfavorites a bus stop. also -- I have not tested this on iOS as I do not have an iPhone.

Potential concern: it looks like stops where multiple busses stop have a marker for each bus route (such as the CCTC Chemistry stop, which has 8 markers), and this system currently favorites all of them and has them all persistently display when the stop is favorited, which could be a performance concern.

Copy link
Copy Markdown
Member

@i-kumar i-kumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - works on iOS

@iswheeler
Copy link
Copy Markdown
Contributor

hey Matthew, thanks for your hard work on this!

Noticed a couple bugs (not sure if they're from your changes or existed before); could you take a look at these please?

  • When you favorite some stops, they lose their direction (in the video you can see that the stop I clicked on goes from pointing right to pointing straight down)
  • When you favorite a TheRide stop and unfavorite it, MaizeBus shows a blue campus bus icon instead of a red TheRide icon (see video)
maizebus_matthew_feature.mp4

Also, about the duplicate stops consideration--if you wanted to try to tackle that problem, you might have luck changing _displayedStopMarkers and _displayedFavoriteStopMarkers to a Map<String, Marker> instead of a Set--that way, you could have the bus stop number (i.e. "C250") map to a Marker. So if you have e.g. 8 routes enabled, the code runs _displayedStopMarkers["C250"] = Marker(...) 8 times but only the last Marker ends up stored in _displayedStopMarkers. If you need to pass a Set to the Google Maps widget, there's a _displayedStopMarkers.value.toSet() function that should work

Copy link
Copy Markdown
Contributor

@iswheeler iswheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, just found the button to request changes. See the post above in the conversation for feedback :)

@i-kumar
Copy link
Copy Markdown
Member

i-kumar commented Mar 27, 2026

good catch. im so glad we have the pr system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants