Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
27.3
-----
* [*] Stats: Improve performance when opening the Stats screen [#25938]
* [*] Stats: Open the latest post when tapping the Latest Post Summary card in the Insights tab [#25896]

27.2
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class StatsLatestPostSummaryInsightsCell: StatsBaseCell, LatestPostSummaryConfig
func configure(withInsightData lastPostInsight: StatsLastPostInsight?, andDelegate delegate: SiteStatsInsightsDelegate?) {
siteStatsInsightsDelegate = delegate
statSection = .insightsLatestPostSummary
selectionStyle = lastPostInsight == nil ? .none : .default

guard let lastPostInsight else {
toggleNoData(show: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,17 @@ struct LatestPostSummaryRow: StatsHashableImmuTableRow {
let summaryData: StatsLastPostInsight?
let chartData: StatsPostDetails?
weak var siteStatsInsightsDelegate: SiteStatsInsightsDelegate?
let action: ImmuTableAction? = nil
var action: ImmuTableAction? {
guard let url = summaryData?.url else {
return nil
}

let delegate = siteStatsInsightsDelegate
return { [weak delegate] _ in
WPAppAnalytics.track(.statsItemTappedLatestPostSummaryPost)
delegate?.displayWebViewWithURL?(url)
}
}
let statSection: StatSection?

func configureCell(_ cell: UITableViewCell) {
Expand Down