diff options
author | George Hazan <george.hazan@gmail.com> | 2023-08-11 18:58:20 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-08-11 18:58:23 +0300 |
commit | 22319c1510762771dd0399118ed048ca993d04c6 (patch) | |
tree | b53364bde91575600cfd755743f4598ba96f3e5e /plugins | |
parent | 40f612ff8265906991ef40500f91c4112275b44b (diff) |
fixes #3634 (tabSRMM заставляет прощёлкать каждое непрочитанное сообщение)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 2 | ||||
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 9 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 7 | ||||
-rw-r--r-- | plugins/VoiceService/src/VoiceCall.cpp | 2 |
6 files changed, 17 insertions, 7 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 4908bd5340..6a0f3a1d43 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -206,7 +206,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) if (!(dbei.flags & DBEF_SENT) && dbei.eventType == EVENTTYPE_MESSAGE) {
db_event_markRead(event->hContact, hDbEvent);
- Clist_RemoveEvent(event->hContact, hDbEvent);
+ Clist_RemoveEvent(-1, hDbEvent);
}
if (!isDbEventShown(dbei)) {
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 0510a95d25..43e9d1e516 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -240,7 +240,7 @@ void ItemData::load(bool bFullLoad) if (!(dbe.flags & DBEF_SENT)) { if (!dbe.markedRead()) db_event_markRead(hContact, hEvent); - Clist_RemoveEvent(hContact, hEvent); + Clist_RemoveEvent(-1, hEvent); } __fallthrough; diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index c9d6c1869e..1e2f63cbb6 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1014,7 +1014,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) while (hDbEvent != 0) {
DB::EventInfo dbei(hDbEvent, false);
if (!(dbei.flags & DBEF_SENT) && DbEventIsMessageOrCustom(dbei))
- Clist_RemoveEvent(m_hContact, hDbEvent);
+ Clist_RemoveEvent(-1, hDbEvent);
hDbEvent = db_event_next(m_hContact, hDbEvent);
}
}
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)));
diff --git a/plugins/VoiceService/src/VoiceCall.cpp b/plugins/VoiceService/src/VoiceCall.cpp index 60768f924c..272011b71c 100644 --- a/plugins/VoiceService/src/VoiceCall.cpp +++ b/plugins/VoiceService/src/VoiceCall.cpp @@ -193,7 +193,7 @@ void VoiceCall::CreateDisplayName() void VoiceCall::RemoveNotifications() { if (clistBlinking) { - Clist_RemoveEvent(hContact, MEVENT(1001)); + Clist_RemoveEvent(hContact, 1001); clistBlinking = false; } |