Add reader.v5.tasks.Task.updated_at.

There was no way to "quickly" get the update date.
This commit is contained in:
funilrys 2022-12-03 19:01:51 +01:00
parent 1be4619b91
commit a43a0712fa
No known key found for this signature in database
GPG Key ID: 0D8BFEF5515C00C6

View File

@ -179,6 +179,14 @@ impl Task {
_ => None,
}
}
pub fn updated_at(&self) -> Option<OffsetDateTime> {
match self.events.last() {
Some(TaskEvent::Created(ts)) => Some(*ts),
_ => None,
}
}
}
impl IndexUid {