summaryrefslogtreecommitdiff
path: root/Hutch/Networking
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch/Networking')
-rw-r--r--Hutch/Networking/ProjectService.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/Hutch/Networking/ProjectService.swift b/Hutch/Networking/ProjectService.swift
index 2afb699..a76d1d7 100644
--- a/Hutch/Networking/ProjectService.swift
+++ b/Hutch/Networking/ProjectService.swift
@@ -20,6 +20,7 @@ private struct ProjectSummaryPayload: Decodable, Sendable {
let website: String?
let visibility: Visibility
let tags: [String]
+ let updated: Date
}
private struct ProjectDetailResponse: Decodable, Sendable {
@@ -92,6 +93,7 @@ struct ProjectService: Sendable {
website
visibility
tags
+ updated
}
cursor
}
@@ -162,7 +164,7 @@ struct ProjectService: Sendable {
for try await project in group {
projects.append(project)
}
- return projects.sorted { $0.name.localizedCaseInsensitiveCompare($1.name) == .orderedAscending }
+ return projects.sorted { $0.updated > $1.updated }
}
}
@@ -267,6 +269,7 @@ struct ProjectService: Sendable {
website: project.website,
visibility: project.visibility,
tags: project.tags,
+ updated: summary.updated,
mailingLists: deduplicate(mailingLists),
sources: deduplicate(sources),
trackers: deduplicate(trackers)