mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02: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:
parent
e99cb9bfb8
commit
b962309498
1 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue