Trait is closer to what caldav servers provide

This commit is contained in:
daladim 2021-03-22 22:06:43 +01:00
parent 7af147e417
commit 86f3566532
11 changed files with 122 additions and 94 deletions

View file

@ -14,7 +14,6 @@ use async_trait::async_trait;
use chrono::{DateTime, Utc};
use crate::traits::CalDavSource;
use crate::traits::SyncSlave;
use crate::traits::PartialCalendar;
use crate::traits::CompleteCalendar;
use crate::calendar::cached_calendar::CachedCalendar;
@ -192,16 +191,6 @@ impl CalDavSource<CachedCalendar> for Cache {
}
}
impl SyncSlave for Cache {
fn get_last_sync(&self) -> Option<DateTime<Utc>> {
self.data.last_sync
}
fn update_last_sync(&mut self, timepoint: Option<DateTime<Utc>>) {
self.data.last_sync = Some(timepoint.unwrap_or_else(|| Utc::now()));
}
}
#[cfg(test)]
mod tests {
use super::*;