From 1839b2c6b498e13b2a339cac3646b84b0d6f3b00 Mon Sep 17 00:00:00 2001 From: Dawid Wojtas Date: Wed, 21 Feb 2024 10:14:47 +0100 Subject: [PATCH] [BH-1861] Backend for quotes on home screen Implement a backend for getting and shuffle the quote for home screen clock face. --- harmony_changelog.md | 1 + .../popups/presenter/QuotesPresenter.hpp | 2 +- module-services/service-appmgr/CMakeLists.txt | 1 + .../messages/InformDateChanged.hpp | 13 ++ .../service-appmgr/messages/Message.hpp | 3 +- .../model/ApplicationManagerCommon.cpp | 3 +- module-services/service-db/DBServiceAPI.cpp | 8 +- .../include/service-db/DBServiceAPI.hpp | 3 +- .../include/service-db/QuotesMessages.hpp | 51 +++++++- .../test/test-service-db-quotes.cpp | 4 +- .../ApplicationBellMain.cpp | 4 +- .../ApplicationBellMain.hpp | 1 + .../presenters/HomeScreenPresenter.hpp | 8 +- .../presenters/HomeScreenPresenter.cpp | 17 ++- .../windows/BellHomeScreenWindow.cpp | 7 ++ .../windows/BellHomeScreenWindow.hpp | 1 + .../model/RelaxationSongsRepository.cpp | 2 +- .../model/RelaxationSongsRepository.hpp | 2 +- .../ApplicationBellSettings.cpp | 5 +- .../models/DateTimeUnitsModel.hpp | 12 +- .../models/DateTimeUnitsModel.cpp | 21 +++- .../presenter/LayoutWindowPresenter.cpp | 37 +++--- .../presenter/LayoutWindowPresenter.hpp | 10 +- .../presenter/TimeUnitsPresenter.cpp | 7 +- .../BellHybrid/apps/common/CMakeLists.txt | 2 + .../layouts/BaseHomeScreenLayoutProvider.hpp | 1 + .../layouts/HomeScreenLayoutClassic.hpp | 1 + .../HomeScreenLayoutClassicWithQuotes.hpp | 1 + .../layouts/HomeScreenLayoutVertical.hpp | 1 + .../include/common/models/QuoteModel.hpp | 36 ++++++ .../BellHybrid/apps/common/src/QuoteModel.cpp | 34 +++++ .../src/layouts/HomeScreenLayoutClassic.cpp | 7 +- .../HomeScreenLayoutClassicWithQuotes.cpp | 21 +++- .../src/layouts/HomeScreenLayoutVertical.cpp | 3 + .../services/appmgr/ApplicationManager.cpp | 12 +- .../include/appmgr/ApplicationManager.hpp | 3 +- .../BellHybrid/services/db/CMakeLists.txt | 5 + products/BellHybrid/services/db/ServiceDB.cpp | 9 +- .../services/db/agents/QuotesAgent.cpp | 45 +++++++ .../services/db/agents/QuotesAgent.hpp | 32 +++++ .../services/db/agents/QuotesQueries.hpp | 15 +++ .../services/db/agents/ShuffleQuoteModel.cpp | 119 ++++++++++++++++++ .../services/db/agents/ShuffleQuoteModel.hpp | 38 ++++++ .../db/databases/migration/quotes/0/down.sql | 2 + .../services/db/include/db/ServiceDB.hpp | 6 +- .../services/appmgr/ApplicationManager.cpp | 17 +-- .../include/appmgr/ApplicationManager.hpp | 3 +- 47 files changed, 554 insertions(+), 82 deletions(-) create mode 100644 module-services/service-appmgr/include/service-appmgr/messages/InformDateChanged.hpp create mode 100644 products/BellHybrid/apps/common/include/common/models/QuoteModel.hpp create mode 100644 products/BellHybrid/apps/common/src/QuoteModel.cpp create mode 100644 products/BellHybrid/services/db/agents/QuotesAgent.cpp create mode 100644 products/BellHybrid/services/db/agents/QuotesAgent.hpp create mode 100644 products/BellHybrid/services/db/agents/QuotesQueries.hpp create mode 100644 products/BellHybrid/services/db/agents/ShuffleQuoteModel.cpp create mode 100644 products/BellHybrid/services/db/agents/ShuffleQuoteModel.hpp diff --git a/harmony_changelog.md b/harmony_changelog.md index 7fd9f64948c2b30bf8c4f2da15a0e3a814fb5806..69e6924c3bd5a20a274058ac794ded1b3e204466 100644 --- a/harmony_changelog.md +++ b/harmony_changelog.md @@ -7,6 +7,7 @@ ### Added * Added new 32px and 170px fonts * Added new clock face with quotes +* Added a backend for quotes on home screen ### Changed / Improved * Updated FSL drivers from NXP diff --git a/module-apps/apps-common/popups/presenter/QuotesPresenter.hpp b/module-apps/apps-common/popups/presenter/QuotesPresenter.hpp index aab22204f9f077c580ea81c9be5201784a82d3b3..21a89abba92cbcbe670003a1cda102f66d014546 100644 --- a/module-apps/apps-common/popups/presenter/QuotesPresenter.hpp +++ b/module-apps/apps-common/popups/presenter/QuotesPresenter.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once diff --git a/module-services/service-appmgr/CMakeLists.txt b/module-services/service-appmgr/CMakeLists.txt index 5523df933e59b4a4e512fd86b0a5ff634a8630d7..bf74a28fd44a8093560e4f84cc76bea4435a6d2b 100644 --- a/module-services/service-appmgr/CMakeLists.txt +++ b/module-services/service-appmgr/CMakeLists.txt @@ -51,6 +51,7 @@ target_sources(service-appmgr include/service-appmgr/messages/GetCurrentDisplayLanguageRequest.hpp include/service-appmgr/messages/GetCurrentDisplayLanguageResponse.hpp include/service-appmgr/messages/LanguageChangeRequest.hpp + include/service-appmgr/messages/InformDateChanged.hpp include/service-appmgr/messages/Message.hpp include/service-appmgr/messages/PowerSaveModeInitRequest.hpp include/service-appmgr/messages/PreventBlockingRequest.hpp diff --git a/module-services/service-appmgr/include/service-appmgr/messages/InformDateChanged.hpp b/module-services/service-appmgr/include/service-appmgr/messages/InformDateChanged.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8ef7a38841d851645d1743a2170b61446eea32b2 --- /dev/null +++ b/module-services/service-appmgr/include/service-appmgr/messages/InformDateChanged.hpp @@ -0,0 +1,13 @@ +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. +// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md + +#pragma once + +#include "BaseMessage.hpp" + +namespace app::manager +{ + class InformDateChanged : public BaseMessage + {}; + +} // namespace app::manager diff --git a/module-services/service-appmgr/include/service-appmgr/messages/Message.hpp b/module-services/service-appmgr/include/service-appmgr/messages/Message.hpp index f5c3c1968e9f75688460d61d79607c2413d0079f..6dd3fa1e81743ada99506b716ea57be9acd0a2ab 100644 --- a/module-services/service-appmgr/include/service-appmgr/messages/Message.hpp +++ b/module-services/service-appmgr/include/service-appmgr/messages/Message.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once @@ -14,6 +14,7 @@ #include "ApplicationInitialised.hpp" #include "ApplicationStatus.hpp" #include "LanguageChangeRequest.hpp" +#include "InformDateChanged.hpp" #include "PowerSaveModeInitRequest.hpp" #include "PreventBlockingRequest.hpp" #include "ShutdownRequest.hpp" diff --git a/module-services/service-appmgr/model/ApplicationManagerCommon.cpp b/module-services/service-appmgr/model/ApplicationManagerCommon.cpp index 302a8689cac9f47e612a3522480e1ccae87d993e..34781355174f150361d418397ac57a9d0e69ccad 100644 --- a/module-services/service-appmgr/model/ApplicationManagerCommon.cpp +++ b/module-services/service-appmgr/model/ApplicationManagerCommon.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "ApplicationManagerCommon.hpp" @@ -696,6 +696,7 @@ namespace app::manager settings->setValue( settings::SystemProperties::displayLanguage, requestedLanguage, settings::SettingsScope::Global); rebuildActiveApplications(); + DBServiceAPI::InformLanguageChanged(this); return true; } diff --git a/module-services/service-db/DBServiceAPI.cpp b/module-services/service-db/DBServiceAPI.cpp index 8d65259135cc759594337bbae14db9806311ffe1..199280b434106916c20dcad6eb1f37fb0f53d5ec 100644 --- a/module-services/service-db/DBServiceAPI.cpp +++ b/module-services/service-db/DBServiceAPI.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "service-db/DBServiceAPI.hpp" @@ -311,6 +311,12 @@ void DBServiceAPI::InformLanguageChanged(sys::Service *serv) DBServiceAPI::GetQuery(serv, db::Interface::Name::Quotes, std::move(query)); } +void DBServiceAPI::InformDateChanged(sys::Service *serv) +{ + auto query = std::make_unique(); + DBServiceAPI::GetQuery(serv, db::Interface::Name::Quotes, std::move(query)); +} + auto DBServiceAPI::hasContactSameNumbers(sys::Service *serv, const ContactRecord &rec) -> bool { std::shared_ptr msg = diff --git a/module-services/service-db/include/service-db/DBServiceAPI.hpp b/module-services/service-db/include/service-db/DBServiceAPI.hpp index 38a0c806c1ab5d913f3eb85801124ef28a1e78d8..83db1854a8a980bef1f9c54440f92193fae3efd2 100644 --- a/module-services/service-db/include/service-db/DBServiceAPI.hpp +++ b/module-services/service-db/include/service-db/DBServiceAPI.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once @@ -127,4 +127,5 @@ class DBServiceAPI static bool AddSMS(sys::Service *serv, const SMSRecord &record, std::unique_ptr &&listener); static void InformLanguageChanged(sys::Service *serv); + static void InformDateChanged(sys::Service *serv); }; diff --git a/module-services/service-db/include/service-db/QuotesMessages.hpp b/module-services/service-db/include/service-db/QuotesMessages.hpp index e3a092634d74c5fe246435a4b05e5b417444e4f0..fb15a333f676fae5fd78cd44824a16f3372139f1 100644 --- a/module-services/service-db/include/service-db/QuotesMessages.hpp +++ b/module-services/service-db/include/service-db/QuotesMessages.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once @@ -15,7 +15,7 @@ namespace Quotes { struct CategoryRecord { - unsigned int category_id; + std::int32_t category_id; std::string category_name; bool enabled; @@ -39,7 +39,7 @@ namespace Quotes struct QuoteRecord { - unsigned int quote_id; + std::int32_t quote_id; std::string quote; std::string author; bool enabled; @@ -55,6 +55,37 @@ namespace Quotes } }; + struct IdQuoteAuthorRecord + { + std::int32_t quote_id; + std::string quote; + std::string author; + + IdQuoteAuthorRecord() = default; + + explicit IdQuoteAuthorRecord(QueryResult *query) + { + quote_id = (*query)[0].getInt32(); + quote = (*query)[1].getString(); + author = (*query)[2].getString(); + } + }; + + struct IdRecord + { + std::int32_t quote_id; + + IdRecord() = default; + + explicit IdRecord(QueryResult *query) + { + quote_id = (*query)[0].getInt32(); + } + }; + + struct IdsList : PagedData + {}; + struct QuotesList : PagedData {}; @@ -309,7 +340,7 @@ namespace Quotes class InformLanguageChangeRequest : public db::Query { public: - InformLanguageChangeRequest() : Query(Query::Type::Read) + explicit InformLanguageChangeRequest() : Query(Query::Type::Read) {} auto debugInfo() const -> std::string @@ -318,6 +349,18 @@ namespace Quotes } }; + class InformDateChanged : public db::Query + { + public: + explicit InformDateChanged() : Query(Query::Type::Read) + {} + + auto debugInfo() const -> std::string + { + return "InformDateChanged"; + } + }; + class WriteQuoteRequest : public db::Query { public: diff --git a/module-services/service-db/test/test-service-db-quotes.cpp b/module-services/service-db/test/test-service-db-quotes.cpp index b1d515811890936cec8d49fffd5cfec3be5e5ddc..85d5d28cea20b1ef1d2f4897e358632b947c99ba 100644 --- a/module-services/service-db/test/test-service-db-quotes.cpp +++ b/module-services/service-db/test/test-service-db-quotes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include @@ -142,7 +142,7 @@ TEST_CASE("Quotes") auto oldRandomizedSequence = quotesString; // Add a new quote - auto quoteId = tester->addQuote(quote, author, enabled); + auto quoteId = static_cast(tester->addQuote(quote, author, enabled)); REQUIRE(oldRandomizedSequence != quotesString); // Check if quotes count has increased diff --git a/products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp b/products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp index 97147026d6671eacee23fa3aaf513842276ec19d..7fdbd7765ebaf0eb9c09f8e60b690d2298434509 100644 --- a/products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp +++ b/products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp @@ -112,6 +112,7 @@ namespace app userSessionModel = std::make_unique(this); batteryLevelNotificationModel = std::make_unique(); usbStatusModel = std::make_unique(); + quoteModel = std::make_unique(this); homeScreenPresenter = std::make_shared(this, *alarmModel, *batteryModel, @@ -119,7 +120,8 @@ namespace app *timeModel, *userSessionModel, *batteryLevelNotificationModel, - *usbStatusModel); + *usbStatusModel, + *quoteModel); createUserInterface(); diff --git a/products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp b/products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp index a0f572f3632f754469d64efcf316ef0a645ea01d..e2c2c651fa13aec4792fd1fa273c40f33c2e4f0d 100644 --- a/products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp +++ b/products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp @@ -54,6 +54,7 @@ namespace app std::unique_ptr userSessionModel; std::unique_ptr batteryLevelNotificationModel; std::unique_ptr usbStatusModel; + std::unique_ptr quoteModel; std::shared_ptr homeScreenPresenter; }; diff --git a/products/BellHybrid/apps/application-bell-main/include/application-bell-main/presenters/HomeScreenPresenter.hpp b/products/BellHybrid/apps/application-bell-main/include/application-bell-main/presenters/HomeScreenPresenter.hpp index 072dc8c119088de536b4bd2f5dd9baf7eacfb69d..6017a14ba64aa68c572401e93e0bee8fb4246417 100644 --- a/products/BellHybrid/apps/application-bell-main/include/application-bell-main/presenters/HomeScreenPresenter.hpp +++ b/products/BellHybrid/apps/application-bell-main/include/application-bell-main/presenters/HomeScreenPresenter.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,7 @@ namespace app::home_screen virtual void setTextDescription(const UTF8 &desc) = 0; virtual void setBatteryLevelState(const Store::Battery &batteryContext) = 0; virtual void updateUsbStatus(bool isConnected) = 0; + virtual void setQuoteText(const UTF8 "eContent, const UTF8 "eAuthor) = 0; /// Various virtual void setLayout(gui::LayoutGenerator layoutGenerator) = 0; @@ -110,6 +112,7 @@ namespace app::home_screen virtual void updateBatteryLevelInterval() = 0; virtual void refreshUserSession() = 0; virtual bool isLowBatteryLevel() const = 0; + virtual void requestQuote() const = 0; static constexpr auto defaultTimeout = std::chrono::milliseconds{5000}; }; @@ -124,7 +127,8 @@ namespace app::home_screen AbstractTimeModel &timeModel, AbstractUserSessionModel &userSessionModel, AbstractBatteryLevelNotificationModel &batteryLevelNotificationModel, - AbstractUsbStatusModel &usbStatusModel); + AbstractUsbStatusModel &usbStatusModel, + AbstractQuoteModel "eModel); virtual ~HomeScreenPresenter(); HomeScreenPresenter() = delete; HomeScreenPresenter &operator=(const HomeScreenPresenter &oth) = delete; @@ -165,6 +169,7 @@ namespace app::home_screen void updateBatteryLevelInterval() override; void refreshUserSession() override; bool isLowBatteryLevel() const override; + void requestQuote() const override; void setLayout(gui::LayoutGenerator layoutGenerator) override; @@ -178,6 +183,7 @@ namespace app::home_screen AbstractUserSessionModel &userSessionModel; AbstractBatteryLevelNotificationModel &batteryLevelNotificationModel; AbstractUsbStatusModel &usbStatusModel; + AbstractQuoteModel "eModel; std::unique_ptr stateController; std::unique_ptr snoozeTimer; std::unique_ptr rngEngine; diff --git a/products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp b/products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp index c8634c12ab2d228c093cfd3257b9b646a0efc62a..685432b05c3ec1dda05fb3f4a70de65445536b9f 100644 --- a/products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp +++ b/products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -80,15 +81,17 @@ namespace app::home_screen AbstractTimeModel &timeModel, AbstractUserSessionModel &userSessionModel, AbstractBatteryLevelNotificationModel &batteryLevelNotificationModel, - AbstractUsbStatusModel &usbStatusModel) + AbstractUsbStatusModel &usbStatusModel, + AbstractQuoteModel "eModel) : app{app}, alarmModel{alarmModel}, batteryModel{batteryModel}, temperatureModel{temperatureModel}, timeModel{timeModel}, userSessionModel{userSessionModel}, - batteryLevelNotificationModel{batteryLevelNotificationModel}, - usbStatusModel{usbStatusModel}, rngEngine{std::make_unique(bsp::trng::getRandomValue())} + batteryLevelNotificationModel{batteryLevelNotificationModel}, usbStatusModel{usbStatusModel}, + quoteModel{quoteModel}, rngEngine{std::make_unique(bsp::trng::getRandomValue())} {} gui::RefreshModes HomeScreenPresenter::handleUpdateTimeEvent() { + requestQuote(); getView()->setTime(timeModel.getCurrentTime()); stateController->handleTimeUpdateEvent(); return handleCyclicDeepRefresh(); @@ -129,6 +132,7 @@ namespace app::home_screen void HomeScreenPresenter::onBeforeShow() { + requestQuote(); stateController->resetStateMachine(); getView()->setTimeFormat(timeModel.getTimeFormat()); getView()->setTime(timeModel.getCurrentTime()); @@ -321,4 +325,11 @@ namespace app::home_screen (batteryStatus.level < constants::lowBatteryInfoThreshold); } + void HomeScreenPresenter::requestQuote() const + { + quoteModel.setCallback( + [this](std::string quote, std::string author) { getView()->setQuoteText(quote, author); }); + quoteModel.sendQuery(); + } + } // namespace app::home_screen diff --git a/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.cpp b/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.cpp index 6e27acaa81f853a9b16203fda2ccdf2a5d8988e6..269cd5ffd30b65fc55063fd8bbb4b1e71ff18858 100644 --- a/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.cpp +++ b/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.cpp @@ -190,4 +190,11 @@ namespace gui } } + void BellHomeScreenWindow::setQuoteText(const UTF8 "eContent, const UTF8 "eAuthor) + { + if (currentLayout) { + currentLayout->setQuoteText(quoteContent, quoteAuthor); + } + } + } // namespace gui diff --git a/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.hpp b/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.hpp index 4670ec97377d832a564003036321759785788237..de07c4c53b66818538fe0b79dd78e98f494a52e6 100644 --- a/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.hpp +++ b/products/BellHybrid/apps/application-bell-main/windows/BellHomeScreenWindow.hpp @@ -41,6 +41,7 @@ namespace gui void setSnoozeFormat(utils::time::Locale::TimeFormat fmt) override; bool updateBatteryStatus() override; void updateUsbStatus(bool isConnected) override; + void setQuoteText(const UTF8 "eContent, const UTF8 "eAuthor) override; std::shared_ptr presenter; diff --git a/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.cpp b/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.cpp index 47c2f19e86296236589af26ec4bb6acbcc27366f..370a579278c67d6a7471c5a03c472fee5b996881 100644 --- a/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.cpp +++ b/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "RelaxationSongsRepository.hpp" #include diff --git a/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.hpp b/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.hpp index fa3ef64bf609ffd81fcbf236adb7d94293ed8b9e..55d29f9d29ce795d1667b446bce4ab502ecb9aae 100644 --- a/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.hpp +++ b/products/BellHybrid/apps/application-bell-relaxation/model/RelaxationSongsRepository.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once diff --git a/products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp b/products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp index 3accbdc2e31c95971526e0d6940845e9282a94a6..9fcf9d7e8a282666ed243346daeb819e1dbf53fb 100644 --- a/products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp +++ b/products/BellHybrid/apps/application-bell-settings/ApplicationBellSettings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "ApplicationBellSettings.hpp" @@ -99,8 +99,9 @@ namespace app gui::window::name::bellSettingsLayout, [this](ApplicationCommon *app, const std::string &name) { auto layoutModel = std::make_unique(this); auto timeModel = std::make_unique(); + auto quoteModel = std::make_unique(this); auto presenter = std::make_unique( - this, std::move(layoutModel), std::move(timeModel)); + this, std::move(layoutModel), std::move(timeModel), std::move(quoteModel)); return std::make_unique(app, std::move(presenter), name); }); diff --git a/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/DateTimeUnitsModel.hpp b/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/DateTimeUnitsModel.hpp index f8260798c2b4b0742108fd66d26de2461e85ec73..bfc06e5f2c3638236a7bd08762289de718b44c54 100644 --- a/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/DateTimeUnitsModel.hpp +++ b/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/DateTimeUnitsModel.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once @@ -7,6 +7,7 @@ #include #include #include