Write docs for subscriptions and reorganize a bit

This commit is contained in:
Héctor Ramón Jiménez 2019-12-14 05:56:46 +01:00
parent 293314405f
commit d6c3da21f7
12 changed files with 224 additions and 122 deletions

View file

@ -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 {

View file

@ -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 { .. } => {