mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fix read from clipboard after bot install.
This commit is contained in:
parent
5cba1cdc64
commit
732bb25666
2 changed files with 5 additions and 5 deletions
|
@ -497,7 +497,7 @@ void AttachWebView::request(const WebViewButton &button) {
|
||||||
data.vquery_id().v,
|
data.vquery_id().v,
|
||||||
qs(data.vurl()),
|
qs(data.vurl()),
|
||||||
button.text,
|
button.text,
|
||||||
button.fromMenu);
|
button.fromMenu || button.url.isEmpty());
|
||||||
});
|
});
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=](const MTP::Error &error) {
|
||||||
_requestId = 0;
|
_requestId = 0;
|
||||||
|
@ -742,7 +742,7 @@ void AttachWebView::requestMenu(
|
||||||
_action->history->peer->input,
|
_action->history->peer->input,
|
||||||
_bot->inputUser,
|
_bot->inputUser,
|
||||||
MTP_string(url),
|
MTP_string(url),
|
||||||
MTPstring(), // url
|
MTPstring(), // start_param
|
||||||
MTP_dataJSON(MTP_bytes(Window::Theme::WebViewParams().json)),
|
MTP_dataJSON(MTP_bytes(Window::Theme::WebViewParams().json)),
|
||||||
MTP_string("tdesktop"),
|
MTP_string("tdesktop"),
|
||||||
MTP_int(_action->replyTo.bare),
|
MTP_int(_action->replyTo.bare),
|
||||||
|
@ -800,7 +800,7 @@ void AttachWebView::show(
|
||||||
uint64 queryId,
|
uint64 queryId,
|
||||||
const QString &url,
|
const QString &url,
|
||||||
const QString &buttonText,
|
const QString &buttonText,
|
||||||
bool fromMenu) {
|
bool allowClipboardRead) {
|
||||||
Expects(_bot != nullptr && _action.has_value());
|
Expects(_bot != nullptr && _action.has_value());
|
||||||
|
|
||||||
const auto close = crl::guard(this, [=] {
|
const auto close = crl::guard(this, [=] {
|
||||||
|
@ -924,7 +924,7 @@ void AttachWebView::show(
|
||||||
.menuButtons = buttons,
|
.menuButtons = buttons,
|
||||||
.handleMenuButton = handleMenuButton,
|
.handleMenuButton = handleMenuButton,
|
||||||
.themeParams = [] { return Window::Theme::WebViewParams(); },
|
.themeParams = [] { return Window::Theme::WebViewParams(); },
|
||||||
.allowClipboardRead = fromMenu,
|
.allowClipboardRead = allowClipboardRead,
|
||||||
});
|
});
|
||||||
*panel = _panel.get();
|
*panel = _panel.get();
|
||||||
started(queryId);
|
started(queryId);
|
||||||
|
|
|
@ -135,7 +135,7 @@ private:
|
||||||
uint64 queryId,
|
uint64 queryId,
|
||||||
const QString &url,
|
const QString &url,
|
||||||
const QString &buttonText = QString(),
|
const QString &buttonText = QString(),
|
||||||
bool fromMenu = false);
|
bool allowClipboardRead = false);
|
||||||
void confirmAddToMenu(
|
void confirmAddToMenu(
|
||||||
AttachWebViewBot bot,
|
AttachWebViewBot bot,
|
||||||
Fn<void()> callback = nullptr);
|
Fn<void()> callback = nullptr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue