mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-15 03:55:03 -04:00
[EGD-3451] RequestRecordsCount refactor in whole project.
This commit is contained in:
committed by
PrzeBrudny
parent
02afbac399
commit
19e1ca696c
@@ -15,14 +15,10 @@
|
||||
NotesModel::NotesModel(app::Application *app) : DatabaseModel(app)
|
||||
{}
|
||||
|
||||
void NotesModel::requestRecordsCount()
|
||||
unsigned int NotesModel::requestRecordsCount()
|
||||
{
|
||||
recordsCount = DBServiceAPI::NotesGetCount(application);
|
||||
|
||||
// request first and second page if possible
|
||||
if (recordsCount > 0) {
|
||||
DBServiceAPI::NotesGetLimitOffset(application, 0, 3);
|
||||
}
|
||||
return recordsCount;
|
||||
}
|
||||
|
||||
void NotesModel::requestRecords(const uint32_t offset, const uint32_t limit)
|
||||
@@ -45,7 +41,6 @@ bool NotesModel::updateRecords(std::unique_ptr<std::vector<NotesRecord>> records
|
||||
#endif
|
||||
|
||||
DatabaseModel::updateRecords(std::move(records), offset, limit, count);
|
||||
modelIndex = 0;
|
||||
list->onProviderDataUpdate();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user