Show correct chat preview for paid media.

This commit is contained in:
John Preston
2024-06-19 15:01:28 +04:00
parent 5f8da27c86
commit 950a946a16
9 changed files with 184 additions and 54 deletions

View File

@@ -618,7 +618,8 @@ FillMenuResult FillSendMenu(
const auto sending = (type != Type::Disabled);
const auto empty = !sending
&& (details.spoiler == SpoilerState::None)
&& (details.caption == CaptionState::None);
&& (details.caption == CaptionState::None)
&& !details.price.has_value();
if (empty || !action) {
return FillMenuResult::Skipped;
}
@@ -651,7 +652,8 @@ FillMenuResult FillSendMenu(
if ((type != Type::Disabled)
&& ((details.spoiler != SpoilerState::None)
|| (details.caption != CaptionState::None))) {
|| (details.caption != CaptionState::None)
|| details.price.has_value())) {
menu->addSeparator(&st::expandedMenuSeparator);
}
if (details.spoiler != SpoilerState::None) {