~aleteoryx/muditaos

0c42628211e74a77c5fb9616f77fc44ec9eb107d — Adam Dobrowolski 4 years ago 15a2394
[EGD-7773] Post review code cleanup

as in status
M module-apps/apps-common/ApplicationCommon.cpp => module-apps/apps-common/ApplicationCommon.cpp +1 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ApplicationCommon.hpp"


@@ 689,8 689,6 @@ namespace app
                      windowsStack().isEmpty() ? "none" : getCurrentWindow()->getName().c_str());
            return sys::msgNotHandled();
        }
        LOG_DEBUG("rendering! %s", msg->getWindowName().c_str());

        render(msg->getMode());
        return sys::msgHandled();
    }

M module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp => module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "AppWindow.hpp"


@@ 66,7 66,6 @@ namespace app
                return true;
            });
        auto phoneLockBlueprint = [&](gui::popup::ID id, std::unique_ptr<gui::PopupRequestParams> &params) {
            LOG_ERROR("HANDLE LOCK BLUEPRINT");
            auto popupParams = dynamic_cast<gui::PhoneUnlockInputRequestParams *>(params.get());
            if (popupParams == nullptr) {
                LOG_ERROR("this is most probably due to wrong unique_ptr handling - please check");

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

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


@@ 36,23 36,6 @@ namespace app
        : Application(name, parent, statusIndicators, startInBackground, stackDepth)
    {
        registerOnPopCallback([](WindowsStack &windowsStack) { windowsStack.dropPendingPopups(); });
        //        getPopupFilter().addAppDependentFilter([&](const gui::PopupRequestParams &popupParams) {
        //            auto val = ((isCurrentWindow(gui::popup::resolveWindowName(gui::popup::ID::Reboot))) ||
        //                        (isCurrentWindow(gui::popup::resolveWindowName(gui::popup::ID::PowerOff))) ||
        //                        (isCurrentWindow(gui::BellTurnOffWindow::name)));
        //            if (val) {
        //                LOG_INFO("popup blocked");
        //                return !val;
        //            }
        //            if (not(((popupParams.getPopupId() == gui::popup::ID::AlarmActivated ||
        //                      popupParams.getPopupId() == gui::popup::ID::AlarmDeactivated)) and
        //                    (not isHomeScreenFocused()))) {
        //                LOG_INFO("popup blocked");
        //                return false;
        //            }
        //            return true;
        //        });

        bus.channels.push_back(sys::BusChannel::ServiceDBNotifications);
        addActionReceiver(manager::actions::ShowAlarm, [this](auto &&data) {
            switchWindow(gui::name::window::main_window, std::move(data));