Skip to content

Commit ed33989

Browse files
Merge pull request #17856 from wordpress-mobile/issue/17764-fix-navigation-between-insights-and-other-tabs
Stats: fix navigation between Insights and other Stats tab
2 parents f890064 + 0561cbc commit ed33989

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-----
33
* [**] Some of the screens of the app has a new, fresh and more modern visual, including the initial one: My Site. [#17812]
44
* [**] Notifications: added a button to mark all notifications in the selected filter as read. [#17840]
5+
* [*] Stats: fix navigation between Stats tab. [#17856]
56
* [*] Quick Start: Fixed a bug where a user logging in via a self-hosted site not connected to Jetpack would see Quick Start when selecting "No thanks" on the Quick Start prompt. [#17855]
67

78
19.1

WordPress/Classes/ViewRelated/Stats/SiteStatsDashboardViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,11 @@ private extension SiteStatsDashboardViewController {
194194
let selectedPeriodChanged = currentSelectedPeriod != oldSelectedPeriod
195195
let previousSelectedPeriodWasInsights = oldSelectedPeriod == .insights
196196
let pageViewControllerIsEmpty = pageViewController?.viewControllers?.isEmpty ?? true
197+
let isGrowAudienceShowingOnInsights = insightsTableViewController.isGrowAudienceShowing
197198

198199
switch currentSelectedPeriod {
199200
case .insights:
200-
if selectedPeriodChanged || pageViewControllerIsEmpty {
201+
if selectedPeriodChanged || pageViewControllerIsEmpty || isGrowAudienceShowingOnInsights {
201202
pageViewController?.setViewControllers([insightsTableViewController],
202203
direction: .forward,
203204
animated: false)

0 commit comments

Comments
 (0)