feat: libcosmic iced 0.14 rebase

This commit is contained in:
Ashley Wulber 2026-03-17 16:56:55 -04:00 committed by GitHub
parent 0020132e63
commit cf7fc32adf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 2731 additions and 1869 deletions

View file

@ -1,6 +1,8 @@
// Copyright 2024 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0
use crate::Wrapper;
use super::Event;
use cosmic_dbus_networkmanager::nm::NetworkManager;
use futures::{SinkExt, StreamExt};
@ -18,13 +20,13 @@ pub fn wireless_enabled_subscription<I: 'static + Hash + Copy + Send + Sync + De
id: I,
conn: Connection,
) -> iced_futures::Subscription<Event> {
Subscription::run_with_id(
id,
Subscription::run_with(Wrapper { id, conn: conn }, |Wrapper { id: _id, conn }| {
let conn = conn.clone();
stream::channel(50, move |output| async move {
watch(conn, output).await;
futures::future::pending().await
}),
)
})
})
}
pub async fn watch(conn: zbus::Connection, mut output: futures::channel::mpsc::Sender<Event>) {