Skip to content

Commit cecfaa8

Browse files
committed
Compare visitors and views separately when sorting SiteVisitStatsItem
1 parent a7f5f18 commit cecfaa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Networking/Networking/Model/Stats/SiteVisitStatsItem.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public struct SiteVisitStatsItem: Equatable, GeneratedCopiable, GeneratedFakeabl
2323
extension SiteVisitStatsItem: Comparable {
2424
public static func < (lhs: SiteVisitStatsItem, rhs: SiteVisitStatsItem) -> Bool {
2525
return lhs.period < rhs.period ||
26-
(lhs.period == rhs.period && lhs.visitors < rhs.visitors && lhs.views < rhs.views)
26+
(lhs.period == rhs.period && lhs.visitors < rhs.visitors) ||
27+
(lhs.period == rhs.period && lhs.visitors == rhs.visitors && lhs.views < rhs.views)
2728
}
2829
}

0 commit comments

Comments
 (0)