Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 9eb26bf

Browse files
BrianLitwinrnystrom
authored andcommitted
Sorts issues after fetch (#2304)
*reverse chronologically
1 parent 508525d commit 9eb26bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Classes/Repository/RepositoryClient.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ func createSummaryModel(
100100
let nextPage = query.nextPageToken(from: data)
101101
let models: [RepositoryIssueSummaryModel] = query.summaryTypes(from: data).compactMap { (node: RepositoryIssueSummaryType) in
102102
return createSummaryModel(node, contentSizeCategory: contentSizeCategory, containerWidth: containerWidth)
103-
}
103+
}.sorted(by: {
104+
$0.created > $1.created
105+
})
104106
return (models, nextPage)
105107
}
106108

0 commit comments

Comments
 (0)