Skip to content

Commit

Permalink
fix: some time also need count down
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 11, 2024
1 parent a5cc649 commit 186012a
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 @@ -620,7 +620,11 @@ impl MultiApplication for LalaMusicBar {
return Command::batch(commands);
}
Message::RemoveNotify(id) => {
let NotifyUnit { id: notify_id, .. } = self.notifications.get(&id).unwrap().unit;
let NotifyUnitWidgetInfo {
counter,
unit: NotifyUnit { id: notify_id, .. },
..
} = self.notifications.get(&id).unwrap().clone();
self.sender
.try_send(NotifyCommand::ActionInvoked {
id: notify_id,
Expand All @@ -639,6 +643,9 @@ impl MultiApplication for LalaMusicBar {
if unit.upper > removed_pos {
unit.upper -= 135;
}
if unit.counter > counter {
unit.counter -= 1;
}
commands.push(Command::single(
LaLaShellIdAction::new(
*id,
Expand Down

0 comments on commit 186012a

Please sign in to comment.