Files
MuditaOS/module-apps/application-notes/presenter/NotesSearchResultPresenter.cpp
Lefucjusz 773f2c7eb1 [BH-2069] Update license URL in headers
Update outdated license file URL in
license headers across all project.
2024-09-18 11:53:01 +02:00

35 lines
1.0 KiB
C++

// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/blob/master/LICENSE.md
#include "NotesSearchResultPresenter.hpp"
namespace app::notes
{
NotesSearchWindowPresenter::NotesSearchWindowPresenter(std::shared_ptr<NotesSearchListModel> notesListItemProvider)
: notesProvider(std::move(notesListItemProvider))
{}
std::shared_ptr<gui::ListItemProvider> NotesSearchWindowPresenter::getNotesItemProvider() const
{
return notesProvider;
}
void NotesSearchWindowPresenter::handleSearchResults(db::NotificationMessage *msgNotification)
{
if (msgNotification->dataModified()) {
getView()->onResultsFilled();
}
}
void NotesSearchWindowPresenter::setSearchText(const std::string &text)
{
notesProvider->setSearchText(text);
}
const std::string &NotesSearchWindowPresenter::getSearchText() const
{
return notesProvider->getSearchText();
}
} // namespace app::notes