From 63a6893fdaf8eef6cb919034ebd3fd35b4b99ad4 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 3 May 2019 17:59:42 +0300 Subject: [PATCH] Excluded ability to display 0 views in channel posts. --- Telegram/SourceFiles/history/history_message.cpp | 2 +- Telegram/SourceFiles/history/view/history_view_message.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index 75035d0b2..4fb83354a 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -1098,7 +1098,7 @@ void HistoryMessage::setViewsCount(int32 count) { const auto was = views->_viewsWidth; views->_views = count; - views->_viewsText = (views->_views >= 0) + views->_viewsText = (views->_views > 0) ? lng_channel_views(lt_count_short, views->_views) : QString(); views->_viewsWidth = views->_viewsText.isEmpty() diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index fb9ef012e..d5bbbbc29 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1797,7 +1797,7 @@ void Message::initTime() { item->_timeWidth = st::msgDateFont->width(item->_timeText); } if (const auto views = item->Get()) { - views->_viewsText = (views->_views >= 0) + views->_viewsText = (views->_views > 0) ? lng_channel_views(lt_count_short, views->_views) : QString(); views->_viewsWidth = views->_viewsText.isEmpty()