From fceec22e76927745f74b9853db9c4975d2680bf7 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 10 Jun 2019 08:45:44 +0300 Subject: dbx_sqlite: dropped first/last event cache (broken by reimplementation) --- plugins/Dbx_sqlite/src/dbcontacts.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) mode change 100644 => 100755 plugins/Dbx_sqlite/src/dbcontacts.cpp (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp') diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp old mode 100644 new mode 100755 index e2bef8664a..0cf3a85d57 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -153,30 +153,14 @@ void DBCachedContact::AddEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread) m_count = HasCount() ? m_count + 1 : 1; - if (m_firstTimestamp > timestamp) { - m_first = hDbEvent; - m_firstTimestamp = timestamp; - } if (unread && m_unreadTimestamp > timestamp) { m_unread = hDbEvent; m_unreadTimestamp = timestamp; } - if (m_lastTimestamp <= timestamp) { - m_last = hDbEvent; - m_lastTimestamp = timestamp; - } } void DBCachedContact::EditEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread) { - if (m_first = hDbEvent && m_firstTimestamp != timestamp) { - m_first = 0; - m_firstTimestamp = 0; - } - else if (m_firstTimestamp > timestamp) { - m_first = hDbEvent; - m_firstTimestamp = timestamp; - } if (m_unread = hDbEvent && (!unread || m_unreadTimestamp != timestamp)) { m_unread = 0; m_unreadTimestamp = 0; @@ -185,32 +169,16 @@ void DBCachedContact::EditEvent(MEVENT hDbEvent, uint32_t timestamp, bool unread m_unread = hDbEvent; m_unreadTimestamp = timestamp; } - if (m_last = hDbEvent && m_lastTimestamp != timestamp) { - m_last = 0; - m_lastTimestamp = 0; - } - else if (m_lastTimestamp <= timestamp) { - m_last = hDbEvent; - m_lastTimestamp = timestamp; - } } void DBCachedContact::DeleteEvent(MEVENT hDbEvent) { if (m_count > 0) m_count--; - if (m_first == hDbEvent) { - m_first = 0; - m_firstTimestamp = 0; - } if (m_unread == hDbEvent) { m_unread = 0; m_unreadTimestamp = 0; } - if (m_last == hDbEvent) { - m_last = 0; - m_lastTimestamp = 0; - } } void DBCachedContact::MarkRead(MEVENT hDbEvent) -- cgit v1.2.3