From df7dc1583d6d15e846c12c008c139964523f8ccf Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 23 Jan 2025 10:55:59 +0400 Subject: [PATCH] Try settings window title for miniapps. --- .../SourceFiles/ui/chat/attach/attach_bot_webview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 7f30d315f..df4d7bc17 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -382,6 +382,16 @@ Panel::Panel(Args &&args) _widget->setWindowFlag(Qt::WindowStaysOnTopHint, false); _widget->setInnerSize(st::botWebViewPanelSize, true); + const auto panel = _widget.get(); + rpl::duplicate( + args.title + ) | rpl::start_with_next([=](const QString &title) { + const auto value = tr::lng_credits_box_history_entry_miniapp(tr::now) + + u": "_q + + title; + panel->window()->setWindowTitle(value); + }, panel->lifetime()); + const auto params = _delegate->botThemeParams(); updateColorOverrides(params);