-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix: fix map by line time related bugs #936
base: main
Are you sure you want to change the base?
Conversation
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.
Great, thank you very much.
Consider adding tests or adding an issue describing the test cases that would cover this bug to prevent future regressions
@@ -35,17 +37,45 @@ export const useSingleLineData = (lineRef?: number, routeIds?: number[]) => { | |||
return pos | |||
}, [locations]) | |||
|
|||
function convertTo24HourAndToNumber(time: string): number { |
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.
The name does not reflect that the output of this method is the number of minutes since midnight. Would you consider renaming this method?
This is my suggestion, but feel free to implement anything you like.
function convertTo24HourAndToNumber(time: string): number { | |
function timestringToMinutes(time: string): number { |
Description
Fixes #902.
Fixes the following issues:
Optimizations:
screenshots
Taken at 22:58 (two minutes before the next bus is scheduled)
Taken at 23:00 (after the bus is scheduled)