summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_contact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_contact.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index f28495e9f1..180b4a2939 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -62,18 +62,13 @@ static int GetStatusModeOrdering(int statusMode)
DWORD CompareContacts2_getLMTime(HANDLE hContact)
{
- HANDLE hDbEvent;
- DBEVENTINFO dbei = {0};
-
- hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDLAST, (WPARAM)hContact, 0);
+ HANDLE hDbEvent = db_event_last(hContact);
while(hDbEvent) {
- dbei.cbSize = sizeof(dbei);
- dbei.pBlob = 0;
- dbei.cbBlob = 0;
- CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get(hDbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
return dbei.timestamp;
- hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDPREV, (WPARAM)hDbEvent, 0);
+ hDbEvent = db_event_prev(hDbEvent);
}
return 0;
}