mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fix crash in native notifications on Linux.
This commit is contained in:
parent
ee156fc6a8
commit
383acf0ffc
1 changed files with 3 additions and 2 deletions
|
@ -578,8 +578,9 @@ void NotificationData::show() {
|
||||||
|| _hints.find(_imageKey) == end(_hints)
|
|| _hints.find(_imageKey) == end(_hints)
|
||||||
? Glib::ustring(GetIconName().toStdString())
|
? Glib::ustring(GetIconName().toStdString())
|
||||||
: Glib::ustring();
|
: Glib::ustring();
|
||||||
|
const auto connection = _dbusConnection;
|
||||||
|
|
||||||
_dbusConnection->call(
|
connection->call(
|
||||||
std::string(kObjectPath),
|
std::string(kObjectPath),
|
||||||
std::string(kInterface),
|
std::string(kInterface),
|
||||||
"Notify",
|
"Notify",
|
||||||
|
@ -595,7 +596,7 @@ void NotificationData::show() {
|
||||||
}),
|
}),
|
||||||
[=](const Glib::RefPtr<Gio::AsyncResult> &result) {
|
[=](const Glib::RefPtr<Gio::AsyncResult> &result) {
|
||||||
try {
|
try {
|
||||||
auto reply = _dbusConnection->call_finish(result);
|
auto reply = connection->call_finish(result);
|
||||||
const auto notificationId = GlibVariantCast<uint>(
|
const auto notificationId = GlibVariantCast<uint>(
|
||||||
reply.get_child(0));
|
reply.get_child(0));
|
||||||
crl::on_main(weak, [=] {
|
crl::on_main(weak, [=] {
|
||||||
|
|
Loading…
Add table
Reference in a new issue