fix: make all subscriptions resistant to being restarted

many of the errors we've been seeing the last few days are because of subscriptions which are restarting
This commit is contained in:
Ashley Wulber 2024-01-18 21:02:35 -05:00 committed by Ashley Wulber
parent ebe688c747
commit d4e0dd8fb8
12 changed files with 184 additions and 138 deletions

View file

@ -222,7 +222,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
fn subscription(&self) -> Subscription<Message> {
Subscription::batch(vec![
workspaces(0).map(Message::WorkspaceUpdate),
workspaces().map(Message::WorkspaceUpdate),
event::listen_with(|e, _| match e {
Mouse(mouse::Event::WheelScrolled { delta }) => Some(Message::WheelScrolled(delta)),
_ => None,