Search in sources :

Example 1 with BloodSugarPreferenceChangedEvent

use of com.faltenreich.diaguard.shared.event.preference.BloodSugarPreferenceChangedEvent in project Diaguard by Faltenreich.

the class BloodSugarPreference method setValueFromUi.

void setValueFromUi(String valueFromUi) {
    float number = FloatUtils.parseNumber(valueFromUi);
    number = PreferenceStore.getInstance().formatCustomToDefaultUnit(Category.BLOODSUGAR, number);
    String value = Float.toString(number);
    persistString(value);
    Events.post(new BloodSugarPreferenceChangedEvent());
}
Also used : BloodSugarPreferenceChangedEvent(com.faltenreich.diaguard.shared.event.preference.BloodSugarPreferenceChangedEvent)

Aggregations

BloodSugarPreferenceChangedEvent (com.faltenreich.diaguard.shared.event.preference.BloodSugarPreferenceChangedEvent)1