adapt to new Task struct instead of Command

This commit is contained in:
Fabrizio Iannetti 2024-06-19 21:49:13 +02:00
parent 7a0f4111d3
commit 5a964fe11a
1 changed files with 3 additions and 3 deletions

View File

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