feat(task): record and display task completion time

Add DoneAt to the download task model: set when a task finishes and
cleared when it is downloaded again. The value flows through the API
model and task record, and is shown as "Completed at" in the task
drawer info tab next to the creation time.
This commit is contained in:
Levi committed 2026-09-20 08:56:54 +08:00
1 parent 694b43e3f9
commit 4b231f52c5
30 files changed
+82 -23

No files matched your search

+2
View File
@@ -35,6 +35,7 @@ class Task {
Progress progress;
DateTime createdAt;
DateTime updatedAt;
DateTime? doneAt;
Task({
required this.id,
@@ -45,6 +46,7 @@ class Task {
required this.progress,
required this.createdAt,
required this.updatedAt,
this.doneAt,
});
factory Task.fromJson(Map<String, dynamic> json) => _$TaskFromJson(json);