From 6769944e16ae45e1a8376dcff48e82fe474c9a90 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 2 Apr 2026 11:22:27 +0300 Subject: [PATCH] Fixed regression with missing play button in list mode for inline bots. --- .../inline_bots/inline_bot_layout_item.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp index 37ea6ce3ab..fa0d231089 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_item.cpp @@ -99,11 +99,18 @@ std::unique_ptr ItemBase::createLayout( if (gallery.has_value()) { if (!*gallery) { - // Force list mode: render all types as Article. - return std::make_unique( - context, - std::move(result), - forceThumb); + // Force list mode: render gallery types as Article. + switch (result->_type) { + case Type::Photo: + case Type::Sticker: + case Type::Gif: + return std::make_unique( + context, + std::move(result), + forceThumb); + default: + break; + } } else { // Force gallery mode: render list types as Thumbnail. switch (result->_type) {