mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-04 13:56:48 -04:00
[EGD-3442] Fix list empty window unhandled behaviours, in place rebuild handling, notes rebuild on note deletion and changed call Icon name to stateIcon. (#1160)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <module-apps/application-notes/presenter/NoteEditWindowPresenter.hpp>
|
||||
#include <module-apps/windows/OptionWindow.hpp>
|
||||
#include <module-apps/windows/Dialog.hpp>
|
||||
#include <module-services/service-db/service-db/DBNotificationMessage.hpp>
|
||||
|
||||
namespace app
|
||||
{
|
||||
@@ -28,7 +29,9 @@ namespace app
|
||||
|
||||
ApplicationNotes::ApplicationNotes(std::string name, std::string parent, StartInBackground startInBackground)
|
||||
: Application(name, parent, startInBackground, NotesStackSize)
|
||||
{}
|
||||
{
|
||||
busChannels.push_back(sys::BusChannels::ServiceDBNotifications);
|
||||
}
|
||||
|
||||
// Invoked upon receiving data message
|
||||
sys::MessagePointer ApplicationNotes::DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp)
|
||||
@@ -39,6 +42,19 @@ namespace app
|
||||
return retMsg;
|
||||
}
|
||||
|
||||
if (msgl->messageType == MessageType::DBServiceNotification) {
|
||||
auto msg = dynamic_cast<db::NotificationMessage *>(msgl);
|
||||
if (msg != nullptr) {
|
||||
// window-specific actions
|
||||
if (msg->interface == db::Interface::Name::Notes) {
|
||||
for (auto &[name, window] : windowsStack) {
|
||||
window->onDatabaseMessage(msg);
|
||||
}
|
||||
}
|
||||
return std::make_shared<sys::ResponseMessage>();
|
||||
}
|
||||
}
|
||||
|
||||
if (resp != nullptr) {
|
||||
switch (resp->responseTo) {
|
||||
case MessageType::DBQuery:
|
||||
|
||||
Reference in New Issue
Block a user