diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 72086b2ec..1f9efff7b 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -322,7 +322,9 @@ Panel::Panel( _widget->closeEvents( ) | rpl::start_with_next(_close, _widget->lifetime()); - style::PaletteChanged( + rpl::combine( + style::PaletteChanged(), + _themeUpdateForced.events() ) | rpl::filter([=] { return !_themeUpdateScheduled; }) | rpl::start_with_next([=] { @@ -564,6 +566,8 @@ bool Panel::createWebview() { sendDataMessage(list.at(1)); } else if (command == "web_app_setup_main_button") { processMainButtonMessage(list.at(1)); + } else if (command == "web_app_request_theme") { + _themeUpdateForced.fire({}); } }); diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.h b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.h index 2a2a8f7f3..85bd54813 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.h +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.h @@ -88,6 +88,7 @@ private: QPointer _webviewParent; std::unique_ptr