Fix a crash on Linux without actions notification capability

This commit is contained in:
Ilya Fedin 2025-04-24 06:54:46 +00:00 committed by John Preston
parent 9bdc19e2fd
commit 79cb4668f1

View file

@ -625,10 +625,10 @@ void Manager::Private::showNotification(
actions.push_back( actions.push_back(
tr::lng_notification_reply(tr::now).toStdString()); tr::lng_notification_reply(tr::now).toStdString());
} }
actions.push_back({});
} }
actions.push_back({});
if (HasCapability("action-icons")) { if (HasCapability("action-icons")) {
hints.insert_value( hints.insert_value(
"action-icons", "action-icons",
@ -788,11 +788,9 @@ void Manager::Private::showNotification(
info.subtitle), info.subtitle),
lt_message, lt_message,
info.message).toStdString()).c_str(), info.message).toStdString()).c_str(),
!actions.empty() (actions
? (actions | ranges::views::transform(&gi::cstring::c_str)
| ranges::views::transform(&gi::cstring::c_str) | ranges::to_vector).data(),
| ranges::to_vector).data()
: nullptr,
hints.end().gobj_(), hints.end().gobj_(),
-1, -1,
nullptr, nullptr,