mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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(
|
StartServiceAsync(
|
||||||
_proxy.get_connection(),
|
_proxy.get_connection(),
|
||||||
crl::guard(weak, [=]() mutable {
|
crl::guard(weak, [=]() mutable {
|
||||||
|
const auto hasImage = !imageKey.empty()
|
||||||
|
&& hints.lookup_value(imageKey);
|
||||||
|
|
||||||
const auto hasBodyMarkup = HasCapability("body-markup");
|
const auto hasBodyMarkup = HasCapability("body-markup");
|
||||||
|
|
||||||
const auto callbackWrap = gi::unwrap(
|
const auto callbackWrap = gi::unwrap(
|
||||||
|
@ -780,9 +783,9 @@ void Manager::Private::showNotification(
|
||||||
_interface.gobj_(),
|
_interface.gobj_(),
|
||||||
AppName.data(),
|
AppName.data(),
|
||||||
0,
|
0,
|
||||||
(imageKey.empty() || !hints.lookup_value(imageKey)
|
(!hasImage
|
||||||
? base::IconName().toStdString()
|
? base::IconName().toStdString()
|
||||||
: std::string()).c_str(),
|
: std::string()).c_str(),
|
||||||
(hasBodyMarkup || info.subtitle.isEmpty()
|
(hasBodyMarkup || info.subtitle.isEmpty()
|
||||||
? info.title.toStdString()
|
? info.title.toStdString()
|
||||||
: info.subtitle.toStdString()
|
: info.subtitle.toStdString()
|
||||||
|
|
Loading…
Add table
Reference in a new issue