refactor: single instance subscription
This commit is contained in:
parent
be0742f209
commit
d9228d78c6
2 changed files with 6 additions and 7 deletions
2
iced
2
iced
|
|
@ -1 +1 @@
|
|||
Subproject commit 982174af4c8a8796aacb020a965c611decba2918
|
||||
Subproject commit d2dc82733de4d6d009f0ab9499076d9d26cd2805
|
||||
|
|
@ -210,12 +210,6 @@ where
|
|||
})
|
||||
.map(super::Message::Cosmic),
|
||||
window_events.map(super::Message::Cosmic),
|
||||
#[cfg(feature = "single-instance")]
|
||||
self.app
|
||||
.core()
|
||||
.single_instance
|
||||
.then(|| super::single_instance_subscription::<T>())
|
||||
.unwrap_or_else(Subscription::none),
|
||||
#[cfg(feature = "xdg-portal")]
|
||||
crate::theme::portal::desktop_settings()
|
||||
.map(Message::DesktopSettings)
|
||||
|
|
@ -230,6 +224,11 @@ where
|
|||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "single-instance")]
|
||||
if self.app.core().single_instance {
|
||||
subscriptions.push(super::single_instance_subscription::<T>());
|
||||
}
|
||||
|
||||
Subscription::batch(subscriptions)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue