forked from upstream-mirrors/OpenTracks
Bugfix: unitSystem not loaded correctly.
Introduced in a5b44175a3
Fixes #1228.
This commit is contained in:
@@ -201,7 +201,7 @@ public class PreferencesUtils {
|
|||||||
|
|
||||||
final String VALUE = getString(R.string.stats_units_key, STATS_UNIT_DEFAULT);
|
final String VALUE = getString(R.string.stats_units_key, STATS_UNIT_DEFAULT);
|
||||||
return Arrays.stream(UnitSystem.values())
|
return Arrays.stream(UnitSystem.values())
|
||||||
.filter(d -> VALUE.equals(getString(d.getPreferenceId(), STATS_UNIT_DEFAULT)))
|
.filter(d -> VALUE.equals(resources.getString(d.getPreferenceId(), STATS_UNIT_DEFAULT)))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(UnitSystem.defaultUnitSystem()); //TODO This AGAIN defines the default
|
.orElse(UnitSystem.defaultUnitSystem()); //TODO This AGAIN defines the default
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user