refactor(surface): type surface actions on the message they carry
This commit is contained in:
parent
376f1b8850
commit
a8fe59f388
21 changed files with 194 additions and 181 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue