diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-08 18:41:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-08 18:41:39 +0300 |
commit | 3f4b4407e1df2bc84f9b7d46863044879d99fd7b (patch) | |
tree | a6951f9fdb263172c7b2c7a7f8ce7a4d56ba460b | |
parent | 138ef5cc83e69cb37632c8f039d5a4e8dbb0ed45 (diff) |
fixes #3326 (iehistory не показывает последние сообщения)
-rw-r--r-- | plugins/Dbx_sqlite/src/dbevents.cpp | 2 | ||||
-rw-r--r-- | plugins/Dbx_sqlite/src/dbintf.h | 5 | ||||
-rw-r--r-- | plugins/Dbx_sqlite/src/version.h | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 15836d29a5..605090c2eb 100644 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -127,6 +127,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei) logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
+ cc->AddEvent();
if (ccSub != nullptr) {
stmt = InitQuery(add_event_sort_query, qEvAddSrt);
sqlite3_bind_int64(stmt, 1, hDbEvent);
@@ -135,6 +136,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei) rc = sqlite3_step(stmt);
logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt); //is this necessary ?
+ ccSub->AddEvent();
}
char *module = m_modules.find((char *)tmp.szModule);
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h index 35404505cb..b21abbe51b 100644 --- a/plugins/Dbx_sqlite/src/dbintf.h +++ b/plugins/Dbx_sqlite/src/dbintf.h @@ -19,6 +19,11 @@ struct DBCachedContact : public DBCachedContactBase m_count(-1)
{}
+ __forceinline void AddEvent()
+ {
+ m_count = HasCount() ? m_count + 1 : 1;
+ }
+
__forceinline bool HasCount() const {
return m_count > -1;
}
diff --git a/plugins/Dbx_sqlite/src/version.h b/plugins/Dbx_sqlite/src/version.h index 83e808b7c4..32cba5986e 100644 --- a/plugins/Dbx_sqlite/src/version.h +++ b/plugins/Dbx_sqlite/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 96
#define __RELEASE_NUM 2
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#include <stdver.h>
|