mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Show bot app name in title.
This commit is contained in:
parent
b3c8a79946
commit
b347308137
2 changed files with 6 additions and 1 deletions
Telegram/SourceFiles/inline_bots
|
@ -1253,6 +1253,7 @@ void WebViewInstance::requestApp(bool allowWrite) {
|
|||
|
||||
using Flag = MTPmessages_RequestAppWebView::Flag;
|
||||
const auto app = _app;
|
||||
const auto title = app->title;
|
||||
const auto flags = Flag::f_theme_params
|
||||
| (_context.fullscreen ? Flag::f_fullscreen : Flag(0))
|
||||
| (_appStartParam.isEmpty() ? Flag(0) : Flag::f_start_param)
|
||||
|
@ -1269,6 +1270,7 @@ void WebViewInstance::requestApp(bool allowWrite) {
|
|||
const auto &data = result.data();
|
||||
show({
|
||||
.url = qs(data.vurl()),
|
||||
.title = title,
|
||||
.fullscreen = data.is_fullscreen(),
|
||||
});
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
|
@ -1350,7 +1352,9 @@ void WebViewInstance::maybeChooseAndRequestButton(PeerTypes supported) {
|
|||
}
|
||||
|
||||
void WebViewInstance::show(ShowArgs &&args) {
|
||||
auto title = Info::Profile::NameValue(_bot);
|
||||
auto title = args.title.isEmpty()
|
||||
? Info::Profile::NameValue(_bot)
|
||||
: rpl::single(args.title);
|
||||
auto titleBadge = _bot->isVerified()
|
||||
? object_ptr<Ui::RpWidget>(_parentShow->toastParent())
|
||||
: nullptr;
|
||||
|
|
|
@ -247,6 +247,7 @@ private:
|
|||
|
||||
struct ShowArgs {
|
||||
QString url;
|
||||
QString title;
|
||||
uint64 queryId = 0;
|
||||
bool fullscreen = false;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue