summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-07 15:30:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-07 15:30:27 +0300
commit6984f16b63161b21ee76df0fb93ef39de4b925b1 (patch)
tree29893b1e619fb8fd970a3feac1dbaa8f0b890aa8 /plugins
parentfec1058c1cfc1d0d1459c7d030458608ae333c26 (diff)
we don't have to restore unread events from blocked accounts
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 13b4b28b8b..30632696d1 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -251,7 +251,7 @@ static void RestoreUnreadMessageAlerts(void)
dbei.cbBlob = 0;
if (db_event_get(hDbEvent, &dbei))
continue;
- if ((dbei.flags & (DBEF_SENT | DBEF_READ)) || !DbEventIsMessageOrCustom(&dbei))
+ if (dbei.markedRead() || !DbEventIsMessageOrCustom(&dbei) || !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 e48a705a71..04dc12876e 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -467,6 +467,8 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
DBEVENTINFO dbei = {};
if (db_event_get(hDbEvent, &dbei))
continue;
+ if (Proto_GetBaseAccountName(hContact) == nullptr)
+ continue;
if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) {
if (Srmm_FindWindow(hContact) != nullptr)