summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_database.h4
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp4
-rw-r--r--protocols/Steam/src/steam_messages.cpp2
-rw-r--r--src/core/stdmsg/src/msgs.cpp4
-rw-r--r--src/mir_app/src/chat_tools.cpp2
-rw-r--r--src/mir_app/src/db_events.cpp2
9 files changed, 10 insertions, 14 deletions
diff --git a/include/m_database.h b/include/m_database.h
index 582c2c273f..3a1393d2d4 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -223,10 +223,6 @@ struct DBEVENTINFO
return bMsec ? (iTimestamp / 1000) : iTimestamp;
}
- bool __forceinline markedRead() const {
- return (bSent || bRead);
- }
-
bool __forceinline operator==(const DBEVENTINFO &e) {
return (iTimestamp == e.iTimestamp && eventType == e.eventType && cbBlob == e.cbBlob && bSent == e.bSent);
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index ed86c8b0ce..298fe9c5b7 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -259,7 +259,7 @@ static void RestoreUnreadMessageAlerts(void)
DB::EventInfo dbei(hDbEvent, false);
if (!dbei)
continue;
- if (dbei.markedRead() || !dbei.isSrmm() || !Proto_GetBaseAccountName(hContact))
+ if (dbei.bRead || !dbei.isSrmm() || !Proto_GetBaseAccountName(hContact))
continue;
int windowAlreadyExists = Srmm_FindWindow(hContact) != nullptr;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index a6ab43374d..fe05abd507 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -457,7 +457,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
if (!dbei)
continue;
- if (!dbei.markedRead() && dbei.isAlertable())
+ if (!dbei.bRead && dbei.isAlertable())
if (!Srmm_FindWindow(hContact))
events.insert(new MSavedEvent(hContact, hDbEvent));
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index fb54eab03f..e89605ae1d 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -376,7 +376,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
DB::EventInfo dbei(hDbEvent);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
bool isShownCustomEvent = dbei.isSrmm();
- if (dbei.markedRead() || (isCustomEvent && !isShownCustomEvent))
+ if (dbei.bRead || (isCustomEvent && !isShownCustomEvent))
return 0;
bool bAutoPopup = g_plugin.bAutoPopup;
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 1c0085df3f..1eb2d12c4b 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -565,7 +565,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
bool isBold = false, isItalic = false, isUnderline = false;
auto *dat = &m_pDlg;
- if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.markedRead())
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bRead)
dat->m_cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
bool isSent = dbei.bSent;
@@ -596,7 +596,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
uint32_t dwEffectiveFlags = dat->m_dwFlags;
- dat->m_bIsHistory = (dbei.getUnixtime() < dat->m_cache->getSessionStart() && dbei.markedRead());
+ dat->m_bIsHistory = (dbei.getUnixtime() < dat->m_cache->getSessionStart() && dbei.bRead);
int iFontIDOffset = dat->m_bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
g_groupBreak = TRUE;
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp
index 28ea4c4b9f..af08d6ae64 100644
--- a/protocols/Steam/src/steam_messages.cpp
+++ b/protocols/Steam/src/steam_messages.cpp
@@ -74,7 +74,7 @@ void CSteamProto::OnGotMarkRead(const CFriendMessagesAckMessageNotification &rep
if (reply.timestamp > dbei.iTimestamp)
break;
- if (!dbei.markedRead())
+ if (!dbei.bRead)
db_event_markRead(hContact, hDbEvent, true);
}
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 6e7e0f2ceb..57ed8bcc9b 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -134,7 +134,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (!dbei)
return 0;
- if (dbei.markedRead() || !DbEventIsShown(dbei))
+ if (dbei.bRead || !DbEventIsShown(dbei))
return 0;
Utils_InvokeAsync(new CAutoPopup(hContact, hDbEvent));
@@ -290,7 +290,7 @@ static void RestoreUnreadMessageAlerts(void)
if (!dbei)
continue;
- if (!dbei.markedRead() && DbEventIsShown(dbei)) {
+ if (!dbei.bRead && DbEventIsShown(dbei)) {
int windowAlreadyExists = Srmm_FindWindow(hContact) != nullptr;
if (windowAlreadyExists)
continue;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 64ab073211..ca602cda67 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -693,7 +693,7 @@ void Chat_EventToGC(SESSION_INFO *si, MEVENT hDbEvent)
GCEVENT gce = { si, GC_EVENT_MESSAGE };
gce.dwFlags = GCEF_ADDTOLOG;
- if (dbei.markedRead())
+ if (dbei.bRead)
gce.dwFlags |= GCEF_NOTNOTIFY;
Utf2T wszUserId(dbei.szUserId);
diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp
index ac3c9085cb..923724ab91 100644
--- a/src/mir_app/src/db_events.cpp
+++ b/src/mir_app/src/db_events.cpp
@@ -194,7 +194,7 @@ void DB::EventInfo::wipeNotify()
if (!m_bValid)
return;
- if (!markedRead())
+ if (!bRead)
db_event_markRead(hContact, m_hEvent);
Clist_RemoveEvent(-1, m_hEvent);
}