From fa70bf9e0cb348f5ab1588952740cb157b200a13 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 23 Jul 2017 12:31:44 +0300 Subject: [PATCH] Fix text message edit admin event log entries. Regression was introduced in a513b1c. In case of text messages entry->_page minimal height is counted in the whole message minimal height and should not be added. --- Telegram/SourceFiles/history/history_message.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index e1418941b..6d69d3f1c 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -1843,9 +1843,12 @@ int HistoryMessage::performResizeGetHeight() { _height = _minh; if (mediaDisplayed) { _media->resizeGetHeight(_maxw); - } - if (entry) { - _height += entry->_page->resizeGetHeight(countGeometry().width()); + if (entry) { + _height += entry->_page->resizeGetHeight(countGeometry().width()); + } + } else if (entry) { + // In case of text-only message it is counted in _minh already. + entry->_page->resizeGetHeight(countGeometry().width()); } } else { if (emptyText()) {