Skip to content

Commit

Permalink
fix: cannot remove all notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Sep 20, 2024
1 parent 12f2cc6 commit 00aa511
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lala_bar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1215,14 +1215,21 @@ impl MultiApplication for LalaMusicBar {
.keys()
.map(|id| iced_runtime::task::effect(Action::Window(WindowAction::Close(*id))))
.collect::<Vec<_>>();
self.notifications.clear();

if let Some(id) = self.hiddenid {
commands.push(iced_runtime::task::effect(Action::Window(
WindowAction::Close(id),
)));
}

for (id, nid) in self.showned_notifications.iter() {
if let Some(info) = self.notifications.get(nid) {
self.cached_notifications.insert(*id, info.clone());
}
}

self.notifications.clear();
self.update_hidden_notification();
commands.push(Command::perform(async {}, |_| Message::CheckOutput));
return Command::batch(commands);
}
Expand Down

0 comments on commit 00aa511

Please sign in to comment.