~aleteoryx/muditaos

76b197f6d56f163dd92daa55b26c42cda219f47f — Tomasz Rybarski 3 years ago f334851
[BH-1434] Fix Bedtime Tone Return

Fix audio playback on return
M products/BellHybrid/apps/application-bell-settings/presenter/BedtimeSettingsPresenter.cpp => products/BellHybrid/apps/application-bell-settings/presenter/BedtimeSettingsPresenter.cpp +1 -1
@@ 22,7 22,6 @@ namespace app::bell_settings
        this->provider->onExit = [this]() { getView()->exit(); };

        this->provider->onToneEnter  = playSound;
        this->provider->onToneExit   = [this](const auto &) { stopSound(); };
        this->provider->onToneChange = playSound;

        this->provider->onVolumeEnter  = playSound;


@@ 65,6 64,7 @@ namespace app::bell_settings
    }
    void SettingsPresenter::exitWithoutSave()
    {
        this->stopSound();
        model->getBedtimeVolume().restoreDefault();
    }
} // namespace app::bell_settings

M products/BellHybrid/apps/application-bell-settings/presenter/alarm_settings/AlarmSettingsPresenter.cpp => products/BellHybrid/apps/application-bell-settings/presenter/alarm_settings/AlarmSettingsPresenter.cpp +1 -1
@@ 22,7 22,6 @@ namespace app::bell_settings
        this->provider->onExit = [this]() { getView()->exit(); };

        this->provider->onToneEnter  = playSound;
        this->provider->onToneExit   = [this](const auto &) { stopSound(); };
        this->provider->onToneChange = playSound;

        this->provider->onVolumeEnter  = playSound;


@@ 67,6 66,7 @@ namespace app::bell_settings

    void AlarmSettingsPresenter::exitWithRollback()
    {
        this->stopSound();
        model->getAlarmVolume().restoreDefault();
        eraseProviderData();
    }

M products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsWindow.cpp => products/BellHybrid/apps/application-bell-settings/windows/alarm_settings/BellSettingsAlarmSettingsWindow.cpp +3 -0
@@ 55,6 55,9 @@ namespace gui
            exit();
            return true;
        }
        if (inputEvent.isShortRelease(KeyCode::KEY_RF)) {
            presenter->exitWithRollback();
        }

        return AppWindow::onInput(inputEvent);
    }