refactor(surface): type surface actions on the message they carry

This commit is contained in:
Hojjat 2026-09-08 13:04:15 -06:00 • committed by Michael Murphy
parent 376f1b8850
commit a8fe59f388
21 changed files with 194 additions and 181 deletions

View file

@ -34,7 +34,7 @@ pub enum Message {
OpenError(Arc<file_chooser::Error>),
OpenFile,
Selected(Url),
Surface(cosmic::surface::Action),
Surface(cosmic::surface::Action<Message>),
}
/// The [`App`] stores application-specific state.
@ -187,9 +187,7 @@ impl cosmic::Application for App {
self.error_status = None;
}
Message::Surface(action) => {
return cosmic::task::message(cosmic::Action::Cosmic(
cosmic::app::Action::Surface(action),
));
return cosmic::task::message(cosmic::Action::Surface(action));
}
}