-
Notifications
You must be signed in to change notification settings - Fork 318
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
Separating the functionality of the previous distance formatter to ma… #5182
Conversation
519d83e
to
3895d86
Compare
Code wise this is looking good. I have a question. From #5065
I saw we opted to expose it through the new |
Part of my reasoning was to maintain backward compatibility and avoid breaking semver. The new implementation will support the Nav. SDK as well as the Android Auto implementation. |
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.
LGTM. Let's add a changelog since the PR introduces new API using MapboxDistanceUtil
.
/cc @cafesilencio
* @param distanceSuffix a suffix that goes with the string value of the distance like 'km' for kilometers, 'ft' for foot/feet, 'mi' for miles etc. depending on the Locale and the UnitType | ||
* @param unitType indicates if the values represented are metric or imperial | ||
*/ | ||
data class FormattedDistanceData( |
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.
should be internal
constructor? if so need to remove data
and override quals/toString/hashCode
3895d86
to
516f406
Compare
516f406
to
e90a411
Compare
…ke it more usable by components that need a less opinionated formatter.
e90a411
to
27b459d
Compare
Description
Addresses what is described in #5065 by refactoring the formatter related code so that the rounding calculations are decoupled from the formatting of the text used in the display. Backwards compatibility is maintained. In addition the new implementation should be usable by the Android Auto implementation which is one of the goals.
Changelog
Screenshots or Gifs