Write docs for subscriptions and reorganize a bit
This commit is contained in:
parent
293314405f
commit
d6c3da21f7
12 changed files with 224 additions and 122 deletions
|
|
@ -47,7 +47,7 @@ impl Application for Events {
|
|||
Command::none()
|
||||
}
|
||||
|
||||
fn subscriptions(&self) -> Subscription<Message> {
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
if self.enabled {
|
||||
iced_native::subscription::events().map(Message::EventOccurred)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ impl Application for Stopwatch {
|
|||
Command::none()
|
||||
}
|
||||
|
||||
fn subscriptions(&self) -> Subscription<Message> {
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
match self.state {
|
||||
State::Idle => Subscription::none(),
|
||||
State::Ticking { .. } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue