diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-15 20:37:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-15 20:37:26 +0300 |
commit | 0f09bc6a33604e79996caaf6ff021226e96e53fd (patch) | |
tree | f603883af17f3b72fd5adbf11b8846ef191e8208 /plugins/IEView/src/ieview_logger.cpp | |
parent | 123fa87f68c42b4f121ad315623a9fb5a39ab30c (diff) |
fixes #3458 (tabSRMM: двоятся сообщения)
Diffstat (limited to 'plugins/IEView/src/ieview_logger.cpp')
-rw-r--r-- | plugins/IEView/src/ieview_logger.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/IEView/src/ieview_logger.cpp b/plugins/IEView/src/ieview_logger.cpp index 9da4150847..6f613882c2 100644 --- a/plugins/IEView/src/ieview_logger.cpp +++ b/plugins/IEView/src/ieview_logger.cpp @@ -103,7 +103,7 @@ public: HandleIEEvent(0, LPARAM(&event)); } - void LogEvents(LOGINFO *pLog, bool bRedraw) override + void LogEvents(SESSION_INFO *si, int iStart, bool bRedraw) override { IEVIEWEVENTDATA ied = {}; ied.dwFlags = IEEDF_UNICODE_NICK; @@ -116,13 +116,15 @@ public: event.eventData = &ied; event.count = 1; - while (pLog) { - ied.szNick.w = pLog->ptszNick; - ied.szText.w = pLog->ptszText; - ied.time = pLog->time; - ied.bIsMe = pLog->bIsMe; + for (int i = iStart; i < si->arEvents.getCount(); i++) { + auto &lin = si->arEvents[i]; - switch (pLog->iType) { + ied.szNick.w = lin.ptszNick; + ied.szText.w = lin.ptszText; + ied.time = lin.time; + ied.bIsMe = lin.bIsMe; + + switch (lin.iType) { case GC_EVENT_MESSAGE: ied.iType = IEED_GC_EVENT_MESSAGE; ied.dwData = IEEDD_GC_SHOW_NICK; @@ -165,8 +167,6 @@ public: ied.dwData |= IEEDD_GC_SHOW_TIME | IEEDD_GC_SHOW_ICON; ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK; HandleIEEvent(0, LPARAM(&event)); - - pLog = pLog->prev; } if (bRedraw) |