[EGD-4487] Application notes implemented. (#1094)

* [EGD-4487] Implementation of notes application.
This commit is contained in:
Piotr Tanski
2020-11-30 13:48:05 +01:00
committed by GitHub
parent 9fdb298463
commit c8c4f82080
56 changed files with 2100 additions and 686 deletions

View File

@@ -0,0 +1,26 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "NotesMainWindowPresenter.hpp"
namespace app::notes
{
NotesMainWindowPresenter::NotesMainWindowPresenter(std::shared_ptr<NotesListItemProvider> notesProvider)
: notesProvider{std::move(notesProvider)}
{}
std::shared_ptr<gui::ListItemProvider> NotesMainWindowPresenter::getNotesItemProvider() const
{
return notesProvider;
}
bool NotesMainWindowPresenter::isNoteListEmpty()
{
return notesProvider->requestRecordsCount() == 0U;
}
bool NotesMainWindowPresenter::updateNotes(std::vector<NotesRecord> &&records)
{
return notesProvider->updateRecords(std::move(records));
}
} // namespace app::notes