summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgutils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
commit3d30ed65f9e226b7b183b23ce5dba435ec491f0b (patch)
tree512db95fca97a5b6f028ed4ca05f473cbd11190c /plugins/Scriver/src/msgutils.cpp
parentb58bd0a705dba9a32e4db1420e2d615c6ee6bd41 (diff)
DBEVENTINFO::timestamp to become 64-bit integer
Diffstat (limited to 'plugins/Scriver/src/msgutils.cpp')
-rw-r--r--plugins/Scriver/src/msgutils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 05159ea6ba..89a5b817d2 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -84,7 +84,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
/* store the event when the container is hidden so that clist notifications can be removed */
if (!IsWindowVisible(m_hwndParent) && m_hDbUnreadEventFirst == 0)
m_hDbUnreadEventFirst = hDbEvent;
- m_lastMessage = dbei.timestamp;
+ m_lastMessage = dbei.getUnixtime();
UpdateStatusBar();
if (bIsActive)
Skin_PlaySound("RecvMsgActive");
@@ -101,7 +101,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
else
RemakeLog();
- if (!(dbei.flags & DBEF_SENT) && !dbei.isCustom(DETF_MSGWINDOW)) {
+ if (!dbei.bSent && !dbei.isCustom(DETF_MSGWINDOW)) {
if (!bIsActive) {
m_iShowUnread = 1;
UpdateIcon();
@@ -122,7 +122,7 @@ bool CMsgDialog::GetFirstEvent()
m_hDbEventFirst = db_event_firstUnread(m_hContact);
if (m_hDbEventFirst != 0) {
DB::EventInfo dbei(m_hDbEventFirst, false);
- if (dbei.isSrmm() && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT))
+ if (dbei.isSrmm() && !dbei.bRead && !dbei.bSent)
notifyUnread = true;
}
@@ -147,11 +147,11 @@ bool CMsgDialog::GetFirstEvent()
case LOADHISTORY_TIME:
if (m_hDbEventFirst == 0)
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
else
db_event_get(m_hDbEventFirst, &dbei);
- uint32_t firstTime = dbei.timestamp - 60 * g_plugin.iLoadTime;
+ uint32_t firstTime = dbei.getUnixtime() - 60 * g_plugin.iLoadTime;
for (;;) {
hPrevEvent = pCursor.FetchNext();
if (hPrevEvent == 0)
@@ -159,7 +159,7 @@ bool CMsgDialog::GetFirstEvent()
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
- if (dbei.timestamp < firstTime)
+ if (dbei.getUnixtime() < firstTime)
break;
if (DbEventIsShown(dbei))
m_hDbEventFirst = hPrevEvent;