Files
MuditaOS/module-apps/application-messages/models/BaseThreadsRecordModel.cpp
Piotr Tański 6c900d7b38 [EGD-5166] Add query-callback synchronization mechanism
Receiver object cancels the callbacks at the end of its lifecycle.
2021-01-13 12:11:56 +01:00

24 lines
644 B
C++

// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "BaseThreadsRecordModel.hpp"
#include "ListView.hpp"
#include <service-db/DBServiceAPI.hpp>
BaseThreadsRecordModel::BaseThreadsRecordModel(app::Application *app) : DatabaseModel(app)
{
requestRecordsCount();
}
unsigned int BaseThreadsRecordModel::requestRecordsCount()
{
return recordsCount;
}
bool BaseThreadsRecordModel::updateRecords(std::vector<ThreadListStruct> records)
{
DatabaseModel::updateRecords(std::move(records));
list->onProviderDataUpdate();
return true;
}