Skip to content

Commit

Permalink
Adding lineName ot make a unique journeyId.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Oct 21, 2024
1 parent fa162ab commit b57bdd0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +36,8 @@ data class TimeTableState(
val legs: ImmutableList<Leg>,
) {
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
Expand Down

0 comments on commit b57bdd0

Please sign in to comment.