Skip to content

🐛 Fix "uneditable" 0min checkins & allow checking in to a destination 0 min away#2322

Merged
MrKrisKrisu merged 1 commit intoTraewelling:developfrom
d3d9:fix_0min
Feb 7, 2024
Merged

🐛 Fix "uneditable" 0min checkins & allow checking in to a destination 0 min away#2322
MrKrisKrisu merged 1 commit intoTraewelling:developfrom
d3d9:fix_0min

Conversation

@d3d9
Copy link
Copy Markdown
Contributor

@d3d9 d3d9 commented Feb 6, 2024

It is currently not possible to edit a checkin where the arrival at the destination is the same time as the departure from the origin without changing the destination. You are forced to change the destination or to delete and recreate the checkin.

Before:

After:


I was wondering whether there are more issues related to these lovely 0 minute durations between stopovers and I found another issue here:

Trip view for start at stopover Obernahmer: it is possible to check in with destination Obernahmer Land or Lahmen Hasen.

Trip view for start at stopover Obernahmer Land: it is not possible to check in towards Lahmen Hasen.

With the fix applied 🐇


I didn't deduplicate the code because I kept using the stopover for the existing checkin edit case, and station + departure for the new trip case. I also don't use the planned arrival anymore inside getAlternativeDestinationsForCheckin since the remaining code determines the exact stopover after which every remaining stopover will pass.
I hope there are no cases where the condition never evaluates to true; or where the pair of (departure + stopover), or (departure + station) are not uniquely identifying exactly one stopover of a trip.

Copy link
Copy Markdown
Member

@MrKrisKrisu MrKrisKrisu left a comment

Choose a reason for hiding this comment

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

oh, well. :D Thanks.

@MrKrisKrisu MrKrisKrisu added this pull request to the merge queue Feb 7, 2024
Merged via the queue into Traewelling:develop with commit a30ba53 Feb 7, 2024
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