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

Expose parseTimeString method and move it to companion object of TimeRangePicker.Time #5

Merged
merged 2 commits into from Jun 17, 2021

Conversation

pelmenstar1
Copy link
Contributor

This PR changes the implementation of parseTimeString (parsing time is not something complex like parsing e-mail and it can be replaced to simpler implementation). For testing and architectural reasons, it can be exposed and moved to companion object of TimeRangePicker.Time. To ensure that new method works in corrent way, tests was added.

@Droppers
Copy link
Owner

Droppers commented Jun 17, 2021

Thank you a lot again! Looks good and is definitely an improvement!

I am sure there are definitely way more improvements that can be made.

For example, reducing memory allocation:

  • getThumbPositions returns a new PointF() instance every time it's called, and it's called a lot
  • Matrix() instance created every time gradient is updated, pretty sure that's not necessary.

@Droppers Droppers merged commit a5c73db into Droppers:main Jun 17, 2021
@pelmenstar1 pelmenstar1 deleted the expose-parse-time branch June 17, 2021 13:58
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.

None yet

2 participants