mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Move hints.lookup_value() out of xdg_notifications_notifications_call_notify
Or it gets executed after hints.end() which clears hints
This commit is contained in:
@@ -743,6 +743,9 @@ void Manager::Private::showNotification(
|
||||
StartServiceAsync(
|
||||
_proxy.get_connection(),
|
||||
crl::guard(weak, [=]() mutable {
|
||||
const auto hasImage = !imageKey.empty()
|
||||
&& hints.lookup_value(imageKey);
|
||||
|
||||
const auto hasBodyMarkup = HasCapability("body-markup");
|
||||
|
||||
const auto callbackWrap = gi::unwrap(
|
||||
@@ -780,9 +783,9 @@ void Manager::Private::showNotification(
|
||||
_interface.gobj_(),
|
||||
AppName.data(),
|
||||
0,
|
||||
(imageKey.empty() || !hints.lookup_value(imageKey)
|
||||
? base::IconName().toStdString()
|
||||
: std::string()).c_str(),
|
||||
(!hasImage
|
||||
? base::IconName().toStdString()
|
||||
: std::string()).c_str(),
|
||||
(hasBodyMarkup || info.subtitle.isEmpty()
|
||||
? info.title.toStdString()
|
||||
: info.subtitle.toStdString()
|
||||
|
||||
Reference in New Issue
Block a user