~aleteoryx/muditaos

310befd13727aaf64ab4933c35d07b0c0bcfda21 — Lukasz Mastalerz 2 years ago cc0ec42
[BH-1769] Incorrect message after setting the alarm with deep press

Fix incorrect message after new alarm setting in some scenarios
M harmony_changelog.md => harmony_changelog.md +1 -0
@@ 8,6 8,7 @@
* Fixed "turn off" window display time
* Fixed uneven screen refresh when turning on the device
* Fixed not disappearing snooze icon when an alarm is deactivated
* Fixed incorrect message after new alarm setting in some scenarios

### Added
* Files not fully transferred via Center will be now removed when USB cable is unplugged

M products/BellHybrid/apps/application-bell-alarm/ApplicationBellAlarm.cpp => products/BellHybrid/apps/application-bell-alarm/ApplicationBellAlarm.cpp +13 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ApplicationBellAlarm.hpp"


@@ 8,6 8,7 @@
#include "windows/BellAlarmSetWindow.hpp"

#include <common/models/AlarmModel.hpp>
#include <appmgr/messages/AlarmMessage.hpp>
#include <common/models/TimeModel.hpp>

namespace app


@@ 18,7 19,17 @@ namespace app
                                               StartInBackground startInBackground,
                                               uint32_t stackDepth)
        : Application(std::move(name), std::move(parent), statusIndicators, startInBackground, stackDepth)
    {}
    {
        bus.channels.push_back(sys::BusChannel::AlarmNotifications);
        connect(typeid(AlarmDeactivated), [this](sys::Message *request) -> sys::MessagePointer {
            alarmModel->activate(false);
            return sys::msgHandled();
        });
        connect(typeid(AlarmActivated), [this](sys::Message *request) -> sys::MessagePointer {
            alarmModel->activate(true);
            return sys::msgHandled();
        });
    }
    ApplicationBellAlarm::~ApplicationBellAlarm() = default;

    sys::ReturnCodes ApplicationBellAlarm::InitHandler()

M products/BellHybrid/apps/application-bell-alarm/CMakeLists.txt => products/BellHybrid/apps/application-bell-alarm/CMakeLists.txt +1 -0
@@ 29,6 29,7 @@ target_include_directories(application-bell-alarm
target_link_libraries(application-bell-alarm
    PRIVATE
        app
        bell::appmgr
        bell::app-main
        bell::app-common
        module-gui

M products/BellHybrid/apps/application-bell-alarm/presenter/BellAlarmSetPresenter.cpp => products/BellHybrid/apps/application-bell-alarm/presenter/BellAlarmSetPresenter.cpp +1 -3
@@ 1,10 1,8 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BellAlarmSetPresenter.hpp"
#include "application-bell-main/ApplicationBellMain.hpp"

#include <Timers/TimerFactory.hpp>
#include <service-appmgr/Controller.hpp>

namespace app::bell_alarm