mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Support location picker on Linux.
This commit is contained in:
@@ -102,7 +102,11 @@ QString SiteNameFromUrl(const QString &url) {
|
||||
}
|
||||
|
||||
bool ShowButton() {
|
||||
static const auto Supported = Webview::NavigateToDataSupported();
|
||||
static const auto Supported = [&] {
|
||||
const auto availability = Webview::Availability();
|
||||
return availability.customSchemeRequests
|
||||
&& availability.customRangeRequests;
|
||||
}();
|
||||
return Supported;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace {
|
||||
constexpr auto kResolveAddressDelay = 3 * crl::time(1000);
|
||||
constexpr auto kSearchDebounceDelay = crl::time(900);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#if defined Q_OS_MAC || defined Q_OS_LINUX
|
||||
const auto kProtocolOverride = "mapboxapihelper";
|
||||
#else // Q_OS_MAC
|
||||
const auto kProtocolOverride = "";
|
||||
@@ -778,7 +778,11 @@ std::shared_ptr<Main::SessionShow> LocationPicker::uiShow() {
|
||||
}
|
||||
|
||||
bool LocationPicker::Available(const LocationPickerConfig &config) {
|
||||
static const auto Supported = Webview::NavigateToDataSupported();
|
||||
static const auto Supported = [&] {
|
||||
const auto availability = Webview::Availability();
|
||||
return availability.customSchemeRequests
|
||||
&& availability.customReferer;
|
||||
}();
|
||||
return Supported && !config.mapsToken.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
Submodule Telegram/lib_webview updated: 46c8bd206e...38c8def33a
Reference in New Issue
Block a user