summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-11 18:58:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-11 18:58:23 +0300
commit22319c1510762771dd0399118ed048ca993d04c6 (patch)
treeb53364bde91575600cfd755743f4598ba96f3e5e /plugins/TabSRMM
parent40f612ff8265906991ef40500f91c4112275b44b (diff)
fixes #3634 (tabSRMM заставляет прощёлкать каждое непрочитанное сообщение)
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp9
-rw-r--r--plugins/TabSRMM/src/msglog.cpp7
2 files changed, 13 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index 7942e378cb..badc8c911f 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -745,6 +745,15 @@ void CMsgDialog::FlashOnClist(MEVENT hEvent, const DBEVENTINFO *dbei)
return;
if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !m_bFlashClist) {
+ for (int i = 0;; i++) {
+ auto *cle = Clist_GetEvent(m_hContact, i);
+ if (cle == nullptr)
+ break;
+
+ if (!mir_strcmp(cle->pszService, MS_MSG_READMESSAGE))
+ return;
+ }
+
CLISTEVENT cle = {};
cle.hContact = m_hContact;
cle.hDbEvent = hEvent;
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index aa049add8b..dca3a53599 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -570,9 +570,10 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
BOOL isSent = (dbei.flags & DBEF_SENT);
BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
- if (!isSent && (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || dbei.isSrmm())) {
- db_event_markRead(streamData->hContact, streamData->hDbEvent);
- Clist_RemoveEvent(streamData->hContact, streamData->hDbEvent);
+ if (!isSent && bIsStatusChangeEvent) {
+ if (!dbei.markedRead())
+ db_event_markRead(streamData->hContact, streamData->hDbEvent);
+ Clist_RemoveEvent(-1, streamData->hDbEvent);
}
CMStringW msg(ptrW(DbEvent_GetTextW(&dbei, CP_UTF8)));