mail client (IMAP/SMTP)
git clone https://git.lucas.co/cce-mail.git
refactor: build the app with Application::create
Application::new(qh, sender) took the session's Wayland queue handle,
which no client ever used, and calloop's sender; cce-ui is retiring it
for create(sender: AppSender<_>), which names no window system. The
body is unchanged: an app that keeps calloop's sender converts the
AppSender into it on the first line, and the now-unused QueueHandle and
EngineState imports go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 21cc579..19fe3a8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5,7 +5,6 @@ mod wpe;
mod accounts_file;
use cce_ui::widget::Owned;
use cce_ui::widget::ScrollRegion;
-use wayland_client::QueueHandle;
use cce_ui::cosmic_text::FontSystem;
use cce_ui::engine::{Application, CursorIcon, EngineState, LogicalPosition, LogicalSize, WindowSettings};
use cce_ui::widget::{
@@ -4764,7 +4763,9 @@ impl Application for ClearEmailApp {
Some(&self.ui_context)
}
- fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
+ fn create(_sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
+ // The app keeps calloop's sender; `AppSender` converts into it.
+ let _sender: calloop::channel::Sender<Self::Message> = _sender.into();
cce_ui::scale::set_scale_factor(1.0);
ipc::spawn_listener(_sender.clone());