diff --git a/Telegram/SourceFiles/iv/iv_data.cpp b/Telegram/SourceFiles/iv/iv_data.cpp index 16f9c0d51..8d424c918 100644 --- a/Telegram/SourceFiles/iv/iv_data.cpp +++ b/Telegram/SourceFiles/iv/iv_data.cpp @@ -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; } diff --git a/Telegram/SourceFiles/ui/controls/location_picker.cpp b/Telegram/SourceFiles/ui/controls/location_picker.cpp index ca0d3ffd7..6d69efebd 100644 --- a/Telegram/SourceFiles/ui/controls/location_picker.cpp +++ b/Telegram/SourceFiles/ui/controls/location_picker.cpp @@ -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 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(); } diff --git a/Telegram/lib_webview b/Telegram/lib_webview index 46c8bd206..38c8def33 160000 --- a/Telegram/lib_webview +++ b/Telegram/lib_webview @@ -1 +1 @@ -Subproject commit 46c8bd206efb11ccc28e2edaaffff360cec74ff0 +Subproject commit 38c8def33a096933b572dcd6fa55a8c13d65e796