mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Support location picker on Linux.
This commit is contained in:
parent
32b95f0d9a
commit
b885779365
3 changed files with 12 additions and 4 deletions
|
@ -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 @@
|
|||
Subproject commit 46c8bd206efb11ccc28e2edaaffff360cec74ff0
|
||||
Subproject commit 38c8def33a096933b572dcd6fa55a8c13d65e796
|
Loading…
Add table
Reference in a new issue