diff options
author | George Hazan <ghazan@miranda.im> | 2022-12-29 14:39:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-12-29 14:40:20 +0300 |
commit | e2fb79358b94182efa1c99f4a92450c548bfd3b2 (patch) | |
tree | 75818ff2a0b2e470ae95cba2c1677c1fbebdf498 /plugins/Dbx_sqlite/src/dbcontacts.cpp | |
parent | 0684e3fa89833b43724edefe9c1eec1a446d7501 (diff) |
DBSQLITE: marked read storage optimization
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_sqlite/src/dbcontacts.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index 8ea6d122ae..1cd6229da3 100644 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -111,45 +111,3 @@ int CDbxSQLite::GetContactSize(void) { return sizeof(DBCachedContact); } - -///////////////////////////////////// - -void DBCachedContact::AddEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread) -{ - m_count = HasCount() ? m_count + 1 : 1; - - if (unread && m_unreadTimestamp > timestamp) { - m_unread = hDbEvent; - m_unreadTimestamp = timestamp; - } -} - -void DBCachedContact::EditEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread) -{ - if (m_unread = hDbEvent && (!unread || m_unreadTimestamp != timestamp)) { - m_unread = 0; - m_unreadTimestamp = 0; - } - else if (unread && timestamp > m_unreadTimestamp) { - m_unread = hDbEvent; - m_unreadTimestamp = timestamp; - } -} - -void DBCachedContact::DeleteEvent(MEVENT hDbEvent) -{ - if (m_count > 0) - m_count--; - if (m_unread == hDbEvent) { - m_unread = 0; - m_unreadTimestamp = 0; - } -} - -void DBCachedContact::MarkRead(MEVENT hDbEvent) -{ - if (m_unread == hDbEvent) { - m_unread = 0; - m_unreadTimestamp = 0; - } -} |