-
Notifications
You must be signed in to change notification settings - Fork 6
feat(RouteCardData): Disruption on branch cases #918
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
Conversation
override val hasSchedulesToday: Boolean, | ||
val hasSchedulesTodayByPattern: Map<String, Boolean>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of my least favorite changes in this PR, but it seemed like the most straightforward path to determining whether we should show "Predictions Unavailable" for a branch with no service vs. if we are dealing with a no scheduled service / service ended scenario.
…so it will be easier to reuse pieces in the stop details page
8f8dd0f
to
a6af465
Compare
@@ -863,7 +1033,7 @@ data class RouteCardData( | |||
this.upcomingTrips ?: emptyList(), | |||
checkNotNull(alertsHere), | |||
allDataLoaded ?: false, | |||
hasSchedulesToday ?: false, | |||
hasSchedulesTodayByPattern ?: routePatterns!!.associate { it.id to false }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: We could also checkNotNull(routePatterns)
here for consistency
Summary
Ticket: 🤖 | Group By Direction | Disruption on a branch
What is this PR for?
With this PR, we now show a separate row for disrupted branches when grouped by headsign to match designs.
Grouping by headsign when we know we are dealing with a branched route seemed like the most straightforward way to accomplish this. TY to @EmmaSimon for feedback on where that grouping logic should live!
iOS
android
withContext(Dispatchers.Default)
where possible (ideally in shared code)Testing
What testing have you done?
Updated stubbed out unit tests
Updated android preview data & confirmed displayed as expected

Tested in running app for a few alerts

