Skip to content

Conversation

@terencebls
Copy link
Contributor

Currently the logic for fetching the next trip is not working correctly because the backend doesn't provide a consistent "destinationText" (this bug is still open openTdataCH/ojp-sdk#198).

In the meantime we can fix this in the SDK and ignore the destinationText from the hash.
Also in order to have more robustness I think that is better to use the ids instead of the name for the leg stations.

…from backend and use ids for stopPoints instead of text
@terencebls terencebls requested review from r3to and vasile December 12, 2025 08:05
h.combine(timedLeg.service.publishedServiceName.text)
h.combine(timedLeg.service.destinationText?.text)
h.combine(timedLeg.legBoard.stopPointName.text)
//h.combine(timedLeg.service.destinationText?.text) // ignore this until this bug is fixed: https://github.com/openTdataCH/ojp-sdk/issues/198
Copy link
Contributor

Choose a reason for hiding this comment

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

Kann man wohl komplett rausnehmen, wenn stopPointRef berücksichtigt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aber destination text ist die finale Destination des Zuges, hingegen die stopPoints sind Abfahrt und Ankunft von deine gefahrene Strecke.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oder meinst du man könnte nutzen destinationStopPointRef ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ja, sorry, habe da was durcheinandergebracht...

Die destinationStopPointRef scheint sich ja nicht zu ändern (im letzten Screenshot von deinem diff im Issue) und könnte permanent anstelle von destinationText verwendet werden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ja super idee! done :)

@terencebls terencebls merged commit 40a5910 into main Dec 15, 2025
1 check passed
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