ChangedCalendar is not implemented this way

This commit is contained in:
daladim 2021-04-05 23:16:19 +02:00
parent 12385d3a85
commit 9305a7a689

View file

@ -50,10 +50,10 @@ pub struct ItemState {
pub enum ChangeToApply { pub enum ChangeToApply {
Rename(String), Rename(String),
SetCompletion(bool), SetCompletion(bool),
ChangeCalendar(CalendarId),
Create(CalendarId, Item), Create(CalendarId, Item),
/// "remove" means "mark for deletion" in the local calendar, or "immediately delete" on the remote calendar /// "remove" means "mark for deletion" in the local calendar, or "immediately delete" on the remote calendar
Remove, Remove,
// ChangeCalendar(CalendarId) is useless, as long as changing a calendar is implemented as "delete in one calendar and re-create it in another one"
} }
@ -692,9 +692,6 @@ where
task.set_completed(new_status.clone()); task.set_completed(new_status.clone());
} }
}, },
ChangeToApply::ChangeCalendar(_) => {
panic!("Not implemented yet");
},
ChangeToApply::Remove => { ChangeToApply::Remove => {
match is_remote { match is_remote {
false => cal.mark_for_deletion(item_id).await.unwrap(), false => cal.mark_for_deletion(item_id).await.unwrap(),
@ -716,7 +713,6 @@ where
match change { match change {
ChangeToApply::Rename(_) | ChangeToApply::Rename(_) |
ChangeToApply::SetCompletion(_) | ChangeToApply::SetCompletion(_) |
ChangeToApply::ChangeCalendar(_) |
ChangeToApply::Remove => { ChangeToApply::Remove => {
panic!("This function only creates items that do not exist yet"); panic!("This function only creates items that do not exist yet");
} }