update libcosmic

this uses a subsurface for the greeter menu and a text input that manages its own input string state
This commit is contained in:
Ashley Wulber 2025-02-21 17:05:50 -05:00 committed by Jeremy Soller
parent 5527c9b866
commit 7918485651
9 changed files with 2440 additions and 1464 deletions

View file

@ -1,6 +1,6 @@
use cosmic::iced::{
futures::{channel::mpsc, SinkExt, StreamExt},
subscription, Subscription,
Subscription,
};
use std::any::TypeId;
use tokio::time;
@ -10,10 +10,9 @@ use zbus::{Connection, Result};
pub fn subscription() -> Subscription<Option<(String, f64)>> {
struct PowerSubscription;
subscription::channel(
Subscription::run_with_id(
TypeId::of::<PowerSubscription>(),
16,
|mut msg_tx| async move {
cosmic::iced_futures::stream::channel(16, |mut msg_tx| async move {
match handler(&mut msg_tx).await {
Ok(()) => {}
Err(err) => {
@ -29,7 +28,7 @@ pub fn subscription() -> Subscription<Option<(String, f64)>> {
loop {
time::sleep(time::Duration::new(60, 0)).await;
}
},
}),
)
}