remove cards that have no associated notifications
This commit is contained in:
parent
97e82e1299
commit
6ff3e669de
1 changed files with 3 additions and 1 deletions
|
|
@ -249,10 +249,12 @@ impl Application for Notifications {
|
||||||
Command::none()
|
Command::none()
|
||||||
}
|
}
|
||||||
Message::Dismissed(id) => {
|
Message::Dismissed(id) => {
|
||||||
info!("dismissed {}", id);
|
info!("Dismissed {}", id);
|
||||||
for c in &mut self.cards {
|
for c in &mut self.cards {
|
||||||
c.1.retain(|n| n.id != id);
|
c.1.retain(|n| n.id != id);
|
||||||
}
|
}
|
||||||
|
self.cards.retain(|c| !c.1.is_empty());
|
||||||
|
|
||||||
if let Some(tx) = &self.dbus_sender {
|
if let Some(tx) = &self.dbus_sender {
|
||||||
let tx = tx.clone();
|
let tx = tx.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue