Fix view giveaway details button in forwards.

This commit is contained in:
John Preston 2023-10-11 16:22:01 +04:00
parent d5429e769f
commit 00db325e91
2 changed files with 7 additions and 0 deletions

View File

@ -2955,6 +2955,10 @@ void Message::refreshDataIdHook() {
if (base::take(_fastReplyLink)) {
_fastReplyLink = fastReplyLink();
}
if (_viewButton) {
_viewButton = nullptr;
updateViewButtonExistence();
}
if (_comments) {
_comments->link = nullptr;
}

View File

@ -89,6 +89,9 @@ inline auto WebPageToPhrase(not_null<WebPageData*> webpage) {
if (const auto giveaway = media->giveaway()) {
const auto peer = media->parent()->history()->peer;
const auto messageId = media->parent()->id;
if (media->parent()->isSending() || media->parent()->hasFailed()) {
return nullptr;
}
const auto info = *giveaway;
return std::make_shared<LambdaClickHandler>([=](
ClickContext context) {