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

@ -35,7 +35,7 @@ pub enum Message {
PopupClosed(Id),
ToggleExampleRow(bool),
Selected(usize),
Surface(cosmic::surface::Action),
Surface(cosmic::surface::Action<Message>),
Toggle(bool),
}
@ -76,9 +76,7 @@ impl cosmic::Application for Window {
self.example_row = toggled;
}
Message::Surface(a) => {
return cosmic::task::message(cosmic::Action::Cosmic(
cosmic::app::Action::Surface(a),
));
return cosmic::task::message(cosmic::Action::Surface(a));
}
Message::Selected(i) => {
self.selected = Some(i);