From 28abbea4fcb659887afe752ce81b4f41fda2374d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Aug 2023 17:44:57 +0300 Subject: code cleaning --- plugins/NewStory/src/history_control.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/NewStory') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index a20e5a752d..c358b918b5 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -92,26 +92,23 @@ void NewstoryListData::OnTimer(CTimer *pTimer) void NewstoryListData::AddChatEvent(SESSION_INFO *si, const LOGINFO *lin) { + ScheduleDraw(); items.addChatEvent(si, lin); totalCount++; - hasData = true; - ScheduleDraw(); } void NewstoryListData::AddEvent(MCONTACT hContact, MEVENT hFirstEvent, int iCount) { + ScheduleDraw(); items.addEvent(hContact, hFirstEvent, iCount); totalCount = items.getCount(); - hasData = true; - ScheduleDraw(); } void NewstoryListData::AddResults(const OBJLIST &results) { + ScheduleDraw(); items.addResults(results); totalCount = items.getCount(); - hasData = true; - ScheduleDraw(); } void NewstoryListData::AddSelection(int iFirst, int iLast) @@ -482,6 +479,8 @@ void NewstoryListData::RecalcScrollBar() void NewstoryListData::ScheduleDraw() { bWasAtBottom = AtBottom(); + hasData = true; + redrawTimer.Stop(); redrawTimer.Start(30); } -- cgit v1.2.3