Bugfix: unitSystem not loaded correctly.

Introduced in a5b44175a3

Fixes #1228.
This commit is contained in:
Dennis Guse
2022-05-12 07:43:49 +02:00
parent d2139d70ad
commit 8ef51ec318
@@ -201,7 +201,7 @@ public class PreferencesUtils {
final String VALUE = getString(R.string.stats_units_key, STATS_UNIT_DEFAULT);
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()
.orElse(UnitSystem.defaultUnitSystem()); //TODO This AGAIN defines the default
}