Skip to content

Commit

Permalink
observerHeightPref
Browse files Browse the repository at this point in the history
Fixes a bug in the observerHeightPref where the Preference would display a stale value after that value was changed by other UI.
  • Loading branch information
forrestguice committed Sep 5, 2022
1 parent 28d159b commit cdaa5a9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@ private static void loadPref_observerHeight(Context context, final LengthPrefere
{
final WidgetSettings.LengthUnit units = WidgetSettings.loadLengthUnitsPref(context, 0);
double observerHeight = WidgetSettings.loadObserverHeightPref(context, 0);
pref.setText((pref.isMetric() ? observerHeight : WidgetSettings.LengthUnit.metersToFeet(observerHeight)) + "");
pref.setSummary(formatObserverHeightSummary(context, observerHeight, units, true));
}
private static CharSequence formatObserverHeightSummary(Context context, double observerHeight, WidgetSettings.LengthUnit units, boolean convert)
Expand Down

0 comments on commit cdaa5a9

Please sign in to comment.