diff options
author | George Hazan <ghazan@miranda.im> | 2021-02-28 22:26:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-02-28 22:26:32 +0300 |
commit | 6b7f8c2129116382c8c67d05164110238845a1e0 (patch) | |
tree | 89f2361fcdcca5e9b1ad613de501f31856dcf2bd /plugins/BuddyExpectator/src/BuddyExpectator.cpp | |
parent | b2c82971f99a2e46cf9a0819ed86154d06d1f92a (diff) |
some evident reverse iterators moved to cursors
Diffstat (limited to 'plugins/BuddyExpectator/src/BuddyExpectator.cpp')
-rw-r--r-- | plugins/BuddyExpectator/src/BuddyExpectator.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 02669fdbe3..54e342ab60 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -80,13 +80,12 @@ void setLastSeen(MCONTACT hContact) time_t getLastInputMsg(MCONTACT hContact)
{
- MEVENT hDbEvent = db_event_last(hContact);
- while (hDbEvent) {
+ DB::ECPTR cursor(DB::EventsRev(hContact));
+ while (MEVENT hDbEvent = cursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
return dbei.timestamp;
- hDbEvent = db_event_prev(hContact, hDbEvent);
}
return -1;
}
|