mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
fix: make it build
This commit is contained in:
parent
92dab0438f
commit
7d9a69bca9
2 changed files with 14 additions and 5 deletions
|
@ -64,6 +64,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include <QSvgRenderer>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
|
||||
namespace InlineBots {
|
||||
namespace {
|
||||
|
||||
|
@ -513,6 +517,11 @@ void BotAction::handleKeyPress(not_null<QKeyEvent*> e) {
|
|||
}
|
||||
}
|
||||
|
||||
QString WebviewPlatform() {
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
return settings->spoofWebviewAsAndroid ? "android" : "tdesktop";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
base::weak_ptr<WebViewInstance> WebViewInstance::PendingActivation;
|
||||
|
@ -843,7 +852,7 @@ void WebViewInstance::requestButton() {
|
|||
MTP_bytes(_button.url),
|
||||
MTP_string(_button.startCommand),
|
||||
MTP_dataJSON(MTP_bytes(botThemeParams().json)),
|
||||
MTP_string("tdesktop"),
|
||||
MTP_string(WebviewPlatform()),
|
||||
action.mtpReplyTo(),
|
||||
(action.options.sendAs
|
||||
? action.options.sendAs->input
|
||||
|
@ -876,7 +885,7 @@ void WebViewInstance::requestSimple() {
|
|||
MTP_bytes(_button.url),
|
||||
MTP_string(_button.startCommand),
|
||||
MTP_dataJSON(MTP_bytes(botThemeParams().json)),
|
||||
MTP_string("tdesktop")
|
||||
MTP_string(WebviewPlatform())
|
||||
)).done([=](const MTPWebViewResult &result) {
|
||||
show(qs(result.data().vurl()));
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
|
@ -901,7 +910,7 @@ void WebViewInstance::requestMain() {
|
|||
_bot->inputUser,
|
||||
MTP_string(_button.startCommand),
|
||||
MTP_dataJSON(MTP_bytes(botThemeParams().json)),
|
||||
MTP_string("tdesktop")
|
||||
MTP_string(WebviewPlatform())
|
||||
)).done([=](const MTPWebViewResult &result) {
|
||||
show(qs(result.data().vurl()));
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
|
@ -925,7 +934,7 @@ void WebViewInstance::requestApp(bool allowWrite) {
|
|||
MTP_inputBotAppID(MTP_long(app->id), MTP_long(app->accessHash)),
|
||||
MTP_string(_appStartParam),
|
||||
MTP_dataJSON(MTP_bytes(botThemeParams().json)),
|
||||
MTP_string("tdesktop")
|
||||
MTP_string(WebviewPlatform())
|
||||
)).done([=](const MTPWebViewResult &result) {
|
||||
_requestId = 0;
|
||||
show(qs(result.data().vurl()));
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ebe1b4bbc729261e83e163a5c21da9959bcc9d13
|
||||
Subproject commit 7f2817b4b9f0894eedd42922ab439e0e04221b40
|
Loading…
Add table
Reference in a new issue