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

@ -98,7 +98,7 @@ pub enum Message {
Input2(String),
Ignore,
ToggleHide,
Surface(cosmic::surface::Action),
Surface(cosmic::surface::Action<Message>),
Hi,
Hi2,
Hi3,
@ -255,9 +255,7 @@ impl cosmic::Application for App {
self.hidden = !self.hidden;
}
Message::Surface(a) => {
return cosmic::task::message(cosmic::Action::Cosmic(
cosmic::app::Action::Surface(a),
));
return cosmic::task::message(cosmic::Action::Surface(a));
}
Message::Hi => {
dbg!("hi");