8000 fix: Discard track change alerts at core CR stops by EmmaSimon · Pull Request #929 · mbta/mobile_app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Discard track change alerts at core CR stops #929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2025

Conversation

EmmaSimon
Copy link
Contributor

Summary

Ticket: Group by Direction | Discard track changes at core stations

We had a check in the NearbyStaticData to remove track change alerts from core CR stops (South and North St, Ruggles, Back Bay), which hadn't been included in the RouteCardData logic. This adds it.

iOS
- [ ] If you added any user-facing strings on iOS, are they included in Localizable.xcstrings?
- [ ] Add temporary machine translations, marked "Needs Review"

android
- [ ] All user-facing strings added to strings resource in alphabetical order
- [ ] Expensive calculations are run in withContext(Dispatchers.Default) where possible (ideally in shared code)

Testing

Added new unit test verifying this behavior, manually verified with test alerts on dev orange

@EmmaSimon EmmaSimon requested a review from a team as a code owner April 29, 2025 20:34
@EmmaSimon EmmaSimon requested a review from KaylaBrady April 29, 2025 20:34
Copy link
Collaborator
@KaylaBrady KaylaBrady left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines 855 to 856
private fun List<Alert>.discardTrackChangesAtCRCore(isCRCore: Boolean): List<Alert> =
if (isCRCore) this.filterNot { it.effect == Alert.Effect.TrackChange } else this
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion (non-blocking): This could be moved to the Alert file for consistency with how we've co-located list extension functions for UpcomingTrip in that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't decide if it made sense for it to be public outside of this, since it's pretty specific to this use case, but I yeah I'll move it out just for clarity.

@EmmaSimon EmmaSimon added this pull request to the merge queue Apr 29, 2025
Merged via the queue into main with commit e07fc1d Apr 29, 2025
10 checks passed
@EmmaSimon EmmaSimon deleted the es-direction-grouping-discard-track-change branch April 29, 2025 21:39
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.

2 participants
0