Skip to content

Commit d308759

Browse files
authored
Fix crash due to an unregistered cell in Stats Insights (#18613)
2 parents 2cf31b7 + 96b8695 commit d308759

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [*] Block Editor: Gallery block: Fix broken "Link To" settings and add "Image Size" settings [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4841]
1414
* [*] Block Editor: Unsupported Block Editor: Prevent WordPress.com tour banner from displaying. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4820]
1515
* [*] Widgets: we fixed an issue where text appeared flipped in rtl languages [#18567]
16+
* [*] Stats: we fixed a crash that occurred sometimes in Stats [#18613]
1617
* [*] Posts list: we fixed an issue where the create button was not shown on iPad in split screen [#18609]
1718

1819
19.8

WordPress/Classes/ViewRelated/Stats/Insights/InsightType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Foundation
22

33
enum InsightType: Int, SiteStatsPinnable {
4-
case viewsVisitors
54
case growAudience
65
case customize
76
case latestPostSummary
@@ -20,6 +19,7 @@ enum InsightType: Int, SiteStatsPinnable {
2019
case allComments
2120
case allTagsAndCategories
2221
case allAnnual
22+
case viewsVisitors
2323

2424
// These Insights will be displayed in this order if a site's Insights have not been customized.
2525
static let defaultInsights: [InsightType] = [.mostPopularTime,

WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -172,29 +172,8 @@ private extension SiteStatsInsightsTableViewController {
172172
}
173173

174174
func tableRowTypes() -> [ImmuTableRow.Type] {
175-
if FeatureFlag.statsNewInsights.enabled {
176-
return [InsightCellHeaderRow.self,
177-
ViewsVisitorsRow.self,
178-
GrowAudienceRow.self,
179-
CustomizeInsightsRow.self,
180-
LatestPostSummaryRow.self,
181-
TwoColumnStatsRow.self,
182-
PostingActivityRow.self,
183-
TabbedTotalsStatsRow.self,
184-
TopTotalsInsightStatsRow.self,
185-
MostPopularTimeInsightStatsRow.self,
186-
TotalInsightStatsRow.self,
187-
TableFooterRow.self,
188-
StatsErrorRow.self,
189-
StatsGhostGrowAudienceImmutableRow.self,
190-
StatsGhostChartImmutableRow.self,
191-
StatsGhostTwoColumnImmutableRow.self,
192-
StatsGhostTopImmutableRow.self,
193-
StatsGhostTabbedImmutableRow.self,
194-
StatsGhostPostingActivitiesImmutableRow.self]
195-
}
196-
197175
return [InsightCellHeaderRow.self,
176+
ViewsVisitorsRow.self,
198177
GrowAudienceRow.self,
199178
CustomizeInsightsRow.self,
200179
LatestPostSummaryRow.self,

0 commit comments

Comments
 (0)