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

@ -23,12 +23,12 @@ bitflags! {
impl SupportedComponents {
pub fn to_xml_string(&self) -> String {
format!(r#"
<C:supported-calendar-component-set>
<B:supported-calendar-component-set>
{} {}
</C:supported-calendar-component-set>
</B:supported-calendar-component-set>
"#,
if self.contains(Self::EVENT) { "<C:comp name=\"VEVENT\"/>" } else { "" },
if self.contains(Self::TODO) { "<C:comp name=\"VTODO\"/>" } else { "" },
if self.contains(Self::EVENT) { "<B:comp name=\"VEVENT\"/>" } else { "" },
if self.contains(Self::TODO) { "<B:comp name=\"VTODO\"/>" } else { "" },
)
}
}