diff options
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 39fb340e3b..959fe799fe 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -766,18 +766,18 @@ void CVkProto::MarkDialogAsRead(MCONTACT hContact) if (userID == VK_INVALID_USER || userID == VK_FEED_USER)
return;
- MEVENT hDBEvent = 0;
+ MEVENT hDBEvent = db_event_firstUnread(hContact);
MCONTACT hMContact = db_mc_tryMeta(hContact);
- while ((hDBEvent = db_event_firstUnread(hContact)) != 0)
- {
+ while (hDBEvent != 0) {
DBEVENTINFO dbei = {};
- if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule))
- {
+ if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule)) {
db_event_markRead(hContact, hDBEvent);
pcli->pfnRemoveEvent(hMContact, hDBEvent);
if (hContact != hMContact)
pcli->pfnRemoveEvent(hContact, hDBEvent);
}
+
+ hDBEvent = db_event_next(hContact, hDBEvent);
}
}
|