~aleteoryx/muditaos

bfd561a52208a1bbb29ff08ab38af9a7882d14b4 — Tomasz Rybarski 4 years ago b702d33
[BH-1164] Remember value for Chime Interval

Meditation timer Chime Interval displays last saved value
M products/BellHybrid/apps/application-bell-meditation-timer/presenter/IntervalChimePresenter.cpp => products/BellHybrid/apps/application-bell-meditation-timer/presenter/IntervalChimePresenter.cpp +3 -2
@@ 29,12 29,13 @@ namespace app::meditation

    std::string IntervalChimePresenter::getCurrentInterval() const
    {
        // Always set interval as none
        const auto value = settings->getValue(intervalDBRecordName, settings::SettingsScope::AppLocal);
        for (auto const &option : intervalOptions) {
            if (option.first == std::chrono::minutes{0}) {
            if (utils::to_string(option.first.count()) == value) {
                return option.second;
            }
        }
        // If not found, return "None"
        return intervalOptions.at(0).second;
    }