From 73a27c2def85c60d1151919fc7688db8ff3ec79a Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 1 Apr 2016 11:52:25 +0400 Subject: [PATCH] Not painting anything in HistoryInner if _history or _migrated have pending resized items. --- Telegram/SourceFiles/historywidget.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 43cd4b3602..a56f487508 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -193,18 +193,16 @@ void HistoryInner::enumerateUserpicsInHistory(History *h, int htop, Method metho } void HistoryInner::paintEvent(QPaintEvent *e) { - if (App::wnd() && App::wnd()->contentOverlapped(this, e)) return; + if (App::wnd() && App::wnd()->contentOverlapped(this, e)) { + return; + } - if (!App::main()) return; + if (!App::main()) { + return; + } if ((_history && _history->hasPendingResizedItems()) || (_migrated && _migrated->hasPendingResizedItems())) { - Notify::handlePendingHistoryUpdate(); - if (_history) { - t_assert(!_history->hasPendingResizedItems()); - } - if (_migrated) { - t_assert(!_migrated->hasPendingResizedItems()); - } + return; } Painter p(this);