krz/hutch
an ios client for sourcehut
clone: git clone https://gitbay.org/krz/hutch.git
c22287d5e256f5b23528114c5efec63069f9c2b5
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2026-04-01T16:52:40Z
Hutch/Models/Project.swift | 1 + Hutch/Networking/ProjectService.swift | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) @@ -65,6 +65,7 @@ struct Project: Identifiable, Hashable, Sendable { let website: String? let visibility: Visibility let tags: [String] + let updated: Date let mailingLists: [MailingList] let sources: [SourceRepo] let trackers: [Tracker] @@ -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)