diff --git a/lala_bar/src/main.rs b/lala_bar/src/main.rs index ca6ce14..fba8736 100644 --- a/lala_bar/src/main.rs +++ b/lala_bar/src/main.rs @@ -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, @@ -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,