mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-10-24 07:28:29 -04:00
Added model for notes.
This commit is contained in:
1 parent
b7808ec50c
commit
4dccaf3370
17 files changed
+195
-30
No files matched your search
@@ -16,8 +16,6 @@ namespace app {
|
||||
|
||||
ApplicationNotes::ApplicationNotes(std::string name, bool startBackgound) :
|
||||
Application( name, startBackgound, 2048 ) {
|
||||
|
||||
notesModel = new NotesModel( this );
|
||||
}
|
||||
|
||||
ApplicationNotes::~ApplicationNotes() {
|
||||
@@ -40,8 +38,8 @@ sys::Message_t ApplicationNotes::DataReceivedHandler(sys::DataMessage* msgl,sys:
|
||||
uint32_t msgType = resp->responseTo;
|
||||
switch( msgType ) {
|
||||
case static_cast<uint32_t>(MessageType::DBNotesGetLimitOffset): {
|
||||
DBNotesResponseMessage* msg = reinterpret_cast<DBNotesResponseMessage*>( resp );
|
||||
notesModel->updateRecords( std::move(msg->records), msg->offset, msg->limit, msg->count );
|
||||
if( currentWindow->onDatabaseMessage( resp ) )
|
||||
refreshWindow( gui::RefreshModes::GUI_REFRESH_FAST );
|
||||
}break;
|
||||
}
|
||||
}
|
||||
@@ -61,8 +59,6 @@ sys::ReturnCodes ApplicationNotes::InitHandler() {
|
||||
|
||||
createUserInterface();
|
||||
|
||||
notesModel->requestRecordsCount();
|
||||
|
||||
setActiveWindow("MainWindow");
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in new issue
Block a user