From 7fa3372fc1b0ee5b0f70c2bfb495cb922ca499e3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2024 10:53:32 +0300 Subject: code cleaning --- plugins/NewStory/src/history_array.cpp | 3 --- plugins/NewStory/src/history_control.cpp | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/NewStory/src') diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index e82dade5aa..195cf55896 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -515,9 +515,6 @@ void HistoryArray::clear() void HistoryArray::addChatEvent(SESSION_INFO *si, const LOGINFO *lin) { - if (si == nullptr) - return; - int numItems = getCount(); auto &p = allocateItem(); p.hContact = si->hContact; diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index c31c0a0e0d..e5108cc7d3 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -109,6 +109,9 @@ void NewstoryListData::OnResize(int newWidth, int newHeight) void NewstoryListData::AddChatEvent(SESSION_INFO *si, const LOGINFO *lin) { + if (si == nullptr) + return; + ScheduleDraw(); items.addChatEvent(si, lin); totalCount++; -- cgit v1.2.3