From ccb3bbea15fcda442f0d7eca0fd59730ded487d1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Dec 2022 11:39:34 +0400 Subject: [PATCH] Apply initial forwards count from the message. --- Telegram/SourceFiles/history/history_item.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index a4b917b87..6f8543312 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -92,6 +92,7 @@ struct HistoryItem::CreateConfig { bool replyIsTopicPost = false; UserId viaBotId = 0; int viewsCount = -1; + int forwardsCount = -1; QString author; PeerId senderOriginal = 0; QString senderNameOriginal; @@ -2705,6 +2706,7 @@ void HistoryItem::createComponents(CreateConfig &&config) { } } } + setForwardsCount(config.forwardsCount); setReplies(std::move(config.replies)); } if (const auto edited = Get()) { @@ -2986,6 +2988,7 @@ void HistoryItem::createComponents(const MTPDmessage &data) { } config.viaBotId = data.vvia_bot_id().value_or_empty(); config.viewsCount = data.vviews().value_or(-1); + config.forwardsCount = data.vforwards().value_or(-1); config.replies = isScheduled() ? HistoryMessageRepliesData() : HistoryMessageRepliesData(data.vreplies());