~aleteoryx/muditaos

b272683938579b94fc39375ba31179b50d3359a8 — Paweł Joński 4 years ago d4d0e7e
[BH-1242] Prewakeup - chime and light at the same time fix

Prewakeup - chime and light at the same time fix
1 files changed, 4 insertions(+), 3 deletions(-)

M products/BellHybrid/services/time/AlarmOperations.cpp
M products/BellHybrid/services/time/AlarmOperations.cpp => products/BellHybrid/services/time/AlarmOperations.cpp +4 -3
@@ 226,17 226,18 @@ namespace alarms

    bool AlarmOperations::handlePreWakeUp(const SingleEventRecord &event, PreWakeUp::Decision decision)
    {
        auto ret = false;
        if (auto alarmEventPtr = std::dynamic_pointer_cast<AlarmEventRecord>(event.parent); alarmEventPtr) {
            if (decision.timeForChime) {
                handleAlarmEvent(alarmEventPtr, alarms::AlarmType::PreWakeUpChime, true);
                return true;
                ret = true;
            }
            if (decision.timeForFrontlight) {
                handleAlarmEvent(alarmEventPtr, alarms::AlarmType::PreWakeUpFrontlight, true);
                return true;
                ret = true;
            }
        }
        return false;
        return ret;
    }

    bool AlarmOperations::processSnoozeChime(TimePoint now)