Send notification via GioApplication, not ashpd

Using ashpd I get `Invalid client serial` too many times.
At least now the notifications keep showing, even if ashpd
is still used to monitor network changes, which could still
stop working arbitrarily after `Invalid client serial`
This commit is contained in:
ranfdev
2023-10-23 11:10:34 +02:00
parent 7866067845
commit 1a65c290fa
5 changed files with 490 additions and 413 deletions

View File

@ -261,3 +261,12 @@ impl From<Status> for u8 {
}
}
}
pub struct Notification {
pub title: String,
pub body: String,
}
pub trait NotificationProxy: Sync + Send {
fn send(&self, n: Notification) -> anyhow::Result<()>;
}