Skip to content

Commit

Permalink
fix: new logic adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 14, 2024
1 parent 8dfbc57 commit 9503c19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lala_bar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,13 +1035,15 @@ impl MultiApplication for LalaMusicBar {
}
}

if self.notifications.len() <= MAX_SHOWN_NOTIFICATIONS_COUNT {
// NOTE: we should delete to be deleted notification
if self.notifications.len() - 1 <= MAX_SHOWN_NOTIFICATIONS_COUNT {
if let Some(id) = self.hidenid {
commands.push(Command::single(Action::Window(WindowAction::Close(id))));
}
}

if self.notifications.is_empty() {
// NOTE: only removed notification remain
if self.notifications.len() == 1 {
commands.push(Command::perform(async {}, |_| Message::CheckOutput));
}

Expand Down

0 comments on commit 9503c19

Please sign in to comment.