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

Commit 1b31242

Browse files
author
Paul Von Schrottky
committed
Made StatsPeriodUnit stringValue public
1 parent 7d6e0e7 commit 1b31242

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/WordPressKit/Models/Stats/StatsSubscribersSummaryData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extension StatsSubscribersSummaryData: StatsTimeIntervalData {
6464
return SubscriberData(date: date, count: count)
6565
}
6666

67-
let sorted = history.compactMap { $0 }.sorted(by: { $0.date.compare($1.date) == .orderedAscending })
67+
let sorted = history.compactMap { $0 }.sorted { $0.date < $1.date }
6868

6969
self = .init(history: sorted, period: period, periodEndDate: date)
7070
}

Sources/WordPressKit/Services/StatsServiceRemoteV2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ extension StatsTimeIntervalData {
395395

396396
// We'll bring `StatsPeriodUnit` into this file when the "old" `WPStatsServiceRemote` gets removed.
397397
// For now we can piggy-back off the old type and add this as an extension.
398-
extension StatsPeriodUnit {
398+
public extension StatsPeriodUnit {
399399
var stringValue: String {
400400
switch self {
401401
case .day:

0 commit comments

Comments
 (0)