Skip to content
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

Improve schedule presentation #229

Merged
merged 1 commit into from
Nov 9, 2019
Merged

Improve schedule presentation #229

merged 1 commit into from
Nov 9, 2019

Conversation

tysg
Copy link

@tysg tysg commented Nov 8, 2019

Closes #129, though it doesn't directly address the problem.

This PR enhances the string representation of schedule so that two connecting time will now show as one time. For example, 1400 - 1500, 1500 - 1600, 1600 - 1700 will just show as 1400 - 1700,

@tysg tysg added this to the v1.4 milestone Nov 8, 2019
@tysg tysg requested a review from a team November 8, 2019 16:51
@tysg tysg self-assigned this Nov 8, 2019
Copy link

@junnbang junnbang left a comment

Choose a reason for hiding this comment

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

looks fine

Comment on lines +128 to +129
EventTime early = e1.compareTo(e2) > 0 ? e2 : e1;
EventTime late = e1.compareTo(e2) > 0 ? e1 : e2;
Copy link

Choose a reason for hiding this comment

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

instead of using the same condition to check twice, use the condition once, and assign both early and late in true and false because once u execute the condition once, you already know the result of early and late

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.

UI: view the schedule of the driver
2 participants