summaryrefslogtreecommitdiff
path: root/src
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 /src
parentfec1058c1cfc1d0d1459c7d030458608ae333c26 (diff)
we don't have to restore unread events from blocked accounts
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/msgs.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 562f6cf058..2070988e55 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -260,13 +260,16 @@ static void RestoreUnreadMessageAlerts(void)
if (db_event_get(hDbEvent, &dbei))
continue;
- if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && (dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
+ if (!dbei.markedRead() && (dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
int windowAlreadyExists = Srmm_FindWindow(hContact) != nullptr;
if (windowAlreadyExists)
continue;
char *szProto = Proto_GetBaseAccountName(hContact);
- if (szProto && (g_dat.popupFlags & SRMMStatusToPf2(Proto_GetStatus(szProto))))
+ if (szProto == nullptr)
+ continue;
+
+ if (g_dat.popupFlags & SRMMStatusToPf2(Proto_GetStatus(szProto)))
autoPopup = true;
if (autoPopup && !windowAlreadyExists)