chore: update iced

This commit is contained in:
Ashley Wulber 2026-03-20 16:17:24 -04:00
parent 5c1887fb07
commit 6c401d7030
7 changed files with 1502 additions and 915 deletions

View file

@ -1,6 +1,9 @@
use cosmic::iced::{
futures::{self, SinkExt},
subscription::{self, Subscription},
use cosmic::{
iced::{
futures::{self, SinkExt, Stream},
Subscription,
},
iced_futures::stream,
};
use mpris_server::{
LoopStatus, Metadata, PlaybackRate, PlaybackStatus, PlayerInterface, Property, RootInterface,
@ -377,15 +380,13 @@ impl PlaylistsInterface for Player {
}
*/
pub fn subscription() -> Subscription<Message> {
struct MprisSubscription;
subscription::channel(
TypeId::of::<MprisSubscription>(),
16,
move |mut msg_tx| async move {
fn watcher_stream() -> impl Stream<Item = Message> {
stream::channel(
5,
move |mut msg_tx: futures::channel::mpsc::Sender<Message>| async move {
let (event_tx, mut event_rx) = mpsc::unbounded_channel();
let meta = MprisMeta::default();
let state = MprisState::default();
let meta: MprisMeta = MprisMeta::default();
let state: MprisState = MprisState::default();
msg_tx
.send(Message::MprisChannel(meta.clone(), state.clone(), event_tx))
.await
@ -455,3 +456,9 @@ pub fn subscription() -> Subscription<Message> {
},
)
}
#[cold]
pub fn subscription() -> Subscription<Message> {
struct MprisSubscription;
Subscription::run_with(TypeId::of::<MprisSubscription>(), |_| watcher_stream())
}