Added color support for calendar creation

This commit is contained in:
daladim 2021-11-23 23:31:51 +01:00
parent d28309b21d
commit a8e5bfbc63
3 changed files with 22 additions and 17 deletions

View file

@ -84,7 +84,7 @@ async fn add_items_and_sync_again(provider: &mut CalDavProvider)
let new_calendar_url: Url = EXAMPLE_CREATED_CALENDAR_URL.parse().unwrap();
let new_calendar_name = "A brave new calendar".to_string();
if let Err(_err) = provider.local_mut()
.create_calendar(new_calendar_url.clone(), new_calendar_name.clone(), SupportedComponents::TODO, None)
.create_calendar(new_calendar_url.clone(), new_calendar_name.clone(), SupportedComponents::TODO, Some("#ff8000".parse().unwrap()))
.await {
println!("Unable to add calendar, maybe it exists already. We're not adding it after all.");
}