mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Always pass activation_token option
glib shows a warning about invalid GVariant and empty activation_token shouldn't hurt I believe
This commit is contained in:
parent
e438cb57bc
commit
bf339de773
2 changed files with 8 additions and 10 deletions
|
@ -78,15 +78,15 @@ bool ShowXDPOpenWithDialog(const QString &filepath) {
|
|||
const auto handleToken = Glib::ustring("tdesktop")
|
||||
+ std::to_string(base::RandomValue<uint>());
|
||||
|
||||
const auto activationToken = []() -> std::optional<Glib::ustring> {
|
||||
const auto activationToken = []() -> Glib::ustring {
|
||||
using base::Platform::WaylandIntegration;
|
||||
if (const auto integration = WaylandIntegration::Instance()) {
|
||||
if (const auto token = integration->activationToken()
|
||||
; !token.isNull()) {
|
||||
return Glib::ustring(token.toStdString());
|
||||
return token.toStdString();
|
||||
}
|
||||
}
|
||||
return std::nullopt;
|
||||
return {};
|
||||
}();
|
||||
|
||||
auto uniqueName = connection->get_unique_name();
|
||||
|
@ -141,16 +141,14 @@ bool ShowXDPOpenWithDialog(const QString &filepath) {
|
|||
"handle_token",
|
||||
Glib::Variant<Glib::ustring>::create(handleToken)
|
||||
},
|
||||
{
|
||||
"activation_token",
|
||||
Glib::Variant<Glib::ustring>::create(activationToken)
|
||||
},
|
||||
{
|
||||
"ask",
|
||||
Glib::Variant<bool>::create(true)
|
||||
},
|
||||
activationToken
|
||||
? std::pair<Glib::ustring, Glib::VariantBase>{
|
||||
"activation_token",
|
||||
Glib::Variant<Glib::ustring>::create(*activationToken)
|
||||
}
|
||||
: std::pair<Glib::ustring, Glib::VariantBase>{},
|
||||
}),
|
||||
}),
|
||||
fdList,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 500731e1f9a4a8b98e388e7a06b91b41d8df7211
|
||||
Subproject commit 283ae7e06112b3fa81da9e87b7fce037c8fb2ccf
|
Loading…
Add table
Reference in a new issue