From a43a0712fa1481dea7c931e7f6bffa62ca97d429 Mon Sep 17 00:00:00 2001 From: funilrys Date: Sat, 3 Dec 2022 19:01:51 +0100 Subject: [PATCH] Add reader.v5.tasks.Task.updated_at. There was no way to "quickly" get the update date. --- dump/src/reader/v5/tasks.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dump/src/reader/v5/tasks.rs b/dump/src/reader/v5/tasks.rs index 528a870fc..17c46f34d 100644 --- a/dump/src/reader/v5/tasks.rs +++ b/dump/src/reader/v5/tasks.rs @@ -179,6 +179,14 @@ impl Task { _ => None, } } + + + pub fn updated_at(&self) -> Option { + match self.events.last() { + Some(TaskEvent::Created(ts)) => Some(*ts), + _ => None, + } + } } impl IndexUid {