From 3d95d004ee1986d78840e9e54e105315f2c3f0d4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Jul 2024 16:03:18 +0300 Subject: fixes #4514 completely --- plugins/TabSRMM/src/msgdlgother.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index e07e303291..49a47794ff 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -737,8 +737,9 @@ int CMsgDialog::FindRTLLocale() void CMsgDialog::FlashOnClist(MEVENT hEvent, const DB::EventInfo &dbei) { m_dwTickLastEvent = GetTickCount(); + bool bSent = dbei.flags & DBEF_SENT; - if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT) && dbei.eventType == EVENTTYPE_MESSAGE) { + if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !bSent) { m_dwUnread++; AddUnreadContact(m_hContact); } @@ -749,7 +750,7 @@ void CMsgDialog::FlashOnClist(MEVENT hEvent, const DB::EventInfo &dbei) if (!g_plugin.bFlashOnClist || isChat()) return; - if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT) && dbei.eventType == EVENTTYPE_MESSAGE && !m_bFlashClist) { + if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !bSent && !m_bFlashClist) { for (int i = 0;; i++) { auto *cle = Clist_GetEvent(m_hContact, i); if (cle == nullptr) -- cgit v1.2.3