Skip to content

Commit 6ff3e66

Browse files
committed
remove cards that have no associated notifications
1 parent 97e82e1 commit 6ff3e66

File tree

1 file changed

+3
-1
lines changed
  • cosmic-applet-notifications/src

1 file changed

+3
-1
lines changed

cosmic-applet-notifications/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,12 @@ impl Application for Notifications {
249249
Command::none()
250250
}
251251
Message::Dismissed(id) => {
252-
info!("dismissed {}", id);
252+
info!("Dismissed {}", id);
253253
for c in &mut self.cards {
254254
c.1.retain(|n| n.id != id);
255255
}
256+
self.cards.retain(|c| !c.1.is_empty());
257+
256258
if let Some(tx) = &self.dbus_sender {
257259
let tx = tx.clone();
258260
tokio::spawn(async move {

0 commit comments

Comments
 (0)