mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-22 23:42:44 -04:00
Egd 2835 sms unread vs unseen notifications (#514)
* [EGD-2835] thread table based sms not read notifications * [EGD-2835] removed redundant read field from sms db table * [EGD-2835] clear unread status of a thread if thre thread is open * [EGD-2835] updated database documentation * [EGD-2835] added changelog
This commit is contained in:
@@ -23,14 +23,12 @@ ThreadRecordInterface::~ThreadRecordInterface()
|
||||
|
||||
bool ThreadRecordInterface::Add(const ThreadRecord &rec)
|
||||
{
|
||||
auto ret = smsDB->threads.Add(ThreadsTableRow{.date = rec.date,
|
||||
.msgCount = rec.msgCount,
|
||||
.msgRead = rec.msgRead,
|
||||
.contactID = rec.contactID,
|
||||
.snippet = rec.snippet,
|
||||
.type = rec.type
|
||||
|
||||
});
|
||||
auto ret = smsDB->threads.Add(ThreadsTableRow{.date = rec.date,
|
||||
.msgCount = rec.msgCount,
|
||||
.unreadMsgCount = rec.unreadMsgCount,
|
||||
.contactID = rec.contactID,
|
||||
.snippet = rec.snippet,
|
||||
.type = rec.type});
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -49,23 +47,29 @@ bool ThreadRecordInterface::RemoveByID(uint32_t id)
|
||||
|
||||
bool ThreadRecordInterface::Update(const ThreadRecord &rec)
|
||||
{
|
||||
return smsDB->threads.Update(ThreadsTableRow{.ID = rec.ID,
|
||||
.date = rec.date,
|
||||
.msgCount = rec.msgCount,
|
||||
.msgRead = rec.msgRead,
|
||||
.contactID = rec.contactID,
|
||||
.snippet = rec.snippet,
|
||||
.type = rec.type
|
||||
return smsDB->threads.Update(ThreadsTableRow{.ID = rec.ID,
|
||||
.date = rec.date,
|
||||
.msgCount = rec.msgCount,
|
||||
.unreadMsgCount = rec.unreadMsgCount,
|
||||
.contactID = rec.contactID,
|
||||
.snippet = rec.snippet,
|
||||
.type = rec.type
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
uint32_t ThreadRecordInterface::GetCount()
|
||||
{
|
||||
|
||||
return smsDB->threads.GetCount();
|
||||
}
|
||||
|
||||
uint32_t ThreadRecordInterface::GetCount(EntryState state)
|
||||
{
|
||||
return smsDB->threads.GetCount(state);
|
||||
}
|
||||
|
||||
bool markAsRead();
|
||||
|
||||
std::unique_ptr<std::vector<ThreadRecord>> ThreadRecordInterface::GetLimitOffset(uint32_t offset, uint32_t limit)
|
||||
{
|
||||
auto records = std::make_unique<std::vector<ThreadRecord>>();
|
||||
|
||||
Reference in New Issue
Block a user