refactor(app-list): use channel subscription

This commit is contained in:
Ashley Wulber 2023-07-11 14:25:45 -04:00 committed by Jeremy Soller
parent 1074f3f49b
commit ff6e9e3483
2 changed files with 41 additions and 37 deletions

View file

@ -1045,7 +1045,7 @@ impl Application for CosmicAppList {
fn subscription(&self) -> Subscription<Message> {
Subscription::batch(vec![
self.applet_helper.theme_subscription(0).map(Message::Theme),
toplevel_subscription(self.subscription_ctr).map(|e| Message::Toplevel(e.1)),
toplevel_subscription(self.subscription_ctr).map(Message::Toplevel),
events_with(|e, _| match e {
cosmic::iced_runtime::core::Event::PlatformSpecific(
event::PlatformSpecific::Wayland(event::wayland::Event::Seat(e, seat)),