From e2fb79358b94182efa1c99f4a92450c548bfd3b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 29 Dec 2022 14:39:17 +0300 Subject: DBSQLITE: marked read storage optimization --- plugins/Dbx_sqlite/src/dbcontacts.cpp | 42 ----------------------------------- 1 file changed, 42 deletions(-) (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp') 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; - } -} -- cgit v1.2.3