fix speed unit setting for "min/km" to show seconds instead of fractional minutes
This commit is contained in:
parent
2b3c71c612
commit
9c08af0ecb
1 changed files with 2 additions and 2 deletions
|
@ -344,8 +344,8 @@ public class OsmAndFormatter {
|
||||||
if (minperkm >= 10) {
|
if (minperkm >= 10) {
|
||||||
return ((int) Math.round(minperkm)) + " " + mc.toShortString(ctx);
|
return ((int) Math.round(minperkm)) + " " + mc.toShortString(ctx);
|
||||||
} else {
|
} else {
|
||||||
int mph10 = (int) Math.round(minperkm * 10f);
|
int seconds = Math.round(minperkm * 60);
|
||||||
return (mph10 / 10f) + " " + mc.toShortString(ctx);
|
return Algorithms.formatDuration(seconds, false) + " " + mc.toShortString(ctx);
|
||||||
}
|
}
|
||||||
} else if (mc == SpeedConstants.MINUTES_PER_MILE) {
|
} else if (mc == SpeedConstants.MINUTES_PER_MILE) {
|
||||||
if (metersperseconds < 0.111111111) {
|
if (metersperseconds < 0.111111111) {
|
||||||
|
|
Loading…
Reference in a new issue