From b873a2605a28bbf43e9cc6679562cf6bbabad601 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Mar 2024 15:20:09 +0300 Subject: for #4290 - popups about offline files are shown even if a SRMM window is opened --- src/mir_app/src/db_events.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp index 901b48709c..992f4422f2 100644 --- a/src/mir_app/src/db_events.cpp +++ b/src/mir_app/src/db_events.cpp @@ -305,15 +305,19 @@ void DB::EventInfo::wipeNotify() // could be displayed in a SRMM window bool DB::EventInfo::isSrmm() const { - auto *et = DbEvent_GetType(szModule, eventType); - return et && et->flags & DETF_MSGWINDOW; + if (auto *et = DbEvent_GetType(szModule, eventType)) + return (et->flags & DETF_MSGWINDOW) != 0; + + return (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_FILE); } // could be displayed in a history window bool DB::EventInfo::isHistory() const { - auto *et = DbEvent_GetType(szModule, eventType); - return et && et->flags & DETF_HISTORY; + if (auto *et = DbEvent_GetType(szModule, eventType)) + return (et->flags & DETF_HISTORY) != 0; + + return (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_FILE); } bool DB::EventInfo::isAlertable() const -- cgit v1.2.3