~aleteoryx/muditaos

f6342a83f651baae03abd3aab4b4ba0c05faa76e — Dawid Wojtas 3 years ago 94a825a
[BH-1621] Fix UI design regression in pre-wake up

Due to changed UI the user couldn't turn off
chime and turn on the front light. Now the user
is able to do it.
M image/assets/lang/English.json => image/assets/lang/English.json +1 -1
@@ 673,7 673,7 @@
  "app_bell_settings_alarm_settings_volume": "Main alarm volume",
  "app_bell_settings_alarm_settings_light": "Main alarm light",
  "app_bell_settings_alarm_settings_prewake_up": "Pre-wake up",
  "app_bell_settings_alarm_settings_prewake_up_chime_top_description": "Pre-wake up",
  "app_bell_settings_alarm_settings_prewake_up_chime_top_description": "Pre-wake up chime",
  "app_bell_settings_alarm_settings_prewake_up_chime_bottom_description": "before the alarm",
  "app_bell_settings_alarm_settings_prewake_up_chime_tone": "Pre-wake up chime tone",
  "app_bell_settings_alarm_settings_prewake_up_chime_volume": "Pre-wake up chime volume",

M products/BellHybrid/alarms/src/actions/FrontlightAction.cpp => products/BellHybrid/alarms/src/actions/FrontlightAction.cpp +1 -3
@@ 99,7 99,6 @@ namespace alarms
    bool FrontlightAction::execute()
    {
        std::string settingString;
        std::string prewakeupString;

        switch (settingsDependency) {
        case SettingsDependency::AlarmClock:


@@ 112,10 111,9 @@ namespace alarms
            }
            break;
        case SettingsDependency::Prewakeup:
            prewakeupString = settings.getValue(bell::settings::PrewakeUp::duration, settings::SettingsScope::Global);
            settingString =
                settings.getValue(bell::settings::PrewakeUp::lightDuration, settings::SettingsScope::Global);
            if (settingString == std::string(prewakeupFrontlightOFF) || prewakeupString == std::string(prewakeupOFF)) {
            if (settingString == std::string(prewakeupFrontlightOFF)) {
                return true;
            }
            break;

M products/BellHybrid/alarms/src/actions/FrontlightAction.hpp => products/BellHybrid/alarms/src/actions/FrontlightAction.hpp +0 -1
@@ 36,7 36,6 @@ namespace alarms
      private:
        static constexpr std::string_view alarmFrontlightOFF     = "0";
        static constexpr std::string_view prewakeupFrontlightOFF = "0";
        static constexpr std::string_view prewakeupOFF           = "0";

        sys::Service &service;
        SettingsDependency settingsDependency;

M products/BellHybrid/apps/application-bell-settings/models/alarm_settings/PrewakeUpListItemProvider.cpp => products/BellHybrid/apps/application-bell-settings/models/alarm_settings/PrewakeUpListItemProvider.cpp +2 -1
@@ 39,7 39,8 @@ namespace app::bell_settings

        chimeDuration->onProceed = [chimeDuration, this]() {
            if (chimeDuration->value() == 0) {
                this->onExit();
                constexpr auto lightDurationListIndex = 3U;
                list->rebuildList(gui::listview::RebuildType::OnOffset, lightDurationListIndex);
                return true;
            }
            return false;