From b57bdd042e9a904be30818fd77ad12d5c436342b Mon Sep 17 00:00:00 2001 From: Karan Sharma <55722391+ksharma-xyz@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:29:19 +1100 Subject: [PATCH] Adding lineName ot make a unique journeyId. --- .../krail/trip_planner/ui/state/timetable/TimeTableState.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/trip-planner/state/src/main/kotlin/xyz/ksharma/krail/trip_planner/ui/state/timetable/TimeTableState.kt b/feature/trip-planner/state/src/main/kotlin/xyz/ksharma/krail/trip_planner/ui/state/timetable/TimeTableState.kt index a5b5129f..7a3bcf83 100644 --- a/feature/trip-planner/state/src/main/kotlin/xyz/ksharma/krail/trip_planner/ui/state/timetable/TimeTableState.kt +++ b/feature/trip-planner/state/src/main/kotlin/xyz/ksharma/krail/trip_planner/ui/state/timetable/TimeTableState.kt @@ -12,7 +12,7 @@ data class TimeTableState( data class JourneyCardInfo( val timeText: String, // "in x mins" - val platformText: Char?=null, // "on Platform X" or Stand A etc. + val platformText: Char? = null, // "on Platform X" or Stand A etc. // If first leg is not walking then, // leg.first.origin.departureTimeEstimated ?: leg.first.origin.departureTimePlanned @@ -36,7 +36,8 @@ data class TimeTableState( val legs: ImmutableList, ) { val journeyId: String - get() = (originUtcDateTime + destinationTime).filter { it.isLetterOrDigit() } + get() = (originUtcDateTime + destinationTime + transportModeLines + .joinToString { it.lineName }).filter { it.isLetterOrDigit() } data class Leg( // modeType - legs.transportation.product.class