adapt to new Task struct instead of Command
This commit is contained in:
parent
7a0f4111d3
commit
5a964fe11a
|
@ -17,7 +17,7 @@ use chrono::{NaiveDate, Months, Utc, Days};
|
||||||
use std::path;
|
use std::path;
|
||||||
use iced::{
|
use iced::{
|
||||||
Alignment,
|
Alignment,
|
||||||
Command,
|
Task,
|
||||||
Element,
|
Element,
|
||||||
Length,
|
Length,
|
||||||
widget::{
|
widget::{
|
||||||
|
@ -72,7 +72,7 @@ impl CalendarApp {
|
||||||
app
|
app
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update(&mut self, message: Message) -> Command<Message> {
|
pub fn update(&mut self, message: Message) -> Task<Message> {
|
||||||
match message {
|
match message {
|
||||||
Message::PrevWeek => {
|
Message::PrevWeek => {
|
||||||
self.view_date = self.view_date - Days::new(7);
|
self.view_date = self.view_date - Days::new(7);
|
||||||
|
@ -96,7 +96,7 @@ impl CalendarApp {
|
||||||
self.controls.mode = Some(mode);
|
self.controls.mode = Some(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Command::none()
|
Task::none()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn view(&self) -> Element<Message> {
|
pub fn view(&self) -> Element<Message> {
|
||||||
|
|
Loading…
Reference in New Issue