diff --git a/WordPress/Classes/Extensions/UIViewController+NoResults.swift b/WordPress/Classes/Extensions/UIViewController+NoResults.swift index fd8461be5a88..7744a8e49150 100644 --- a/WordPress/Classes/Extensions/UIViewController+NoResults.swift +++ b/WordPress/Classes/Extensions/UIViewController+NoResults.swift @@ -116,6 +116,8 @@ extension NoResultsViewHost where Self: UIViewController { if animated { view.addSubview(withFadeAnimation: noResultsViewController.view) + } else { + view.addSubview(noResultsViewController.view) } noResultsViewController.didMove(toParent: self) } diff --git a/WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift b/WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift index f65efbc434b9..549289241f91 100644 --- a/WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift +++ b/WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift @@ -142,8 +142,10 @@ private extension SiteStatsInsightsTableViewController { updateNoResults(title: NoResultConstants.errorTitle, subtitle: NoResultConstants.errorSubtitle, buttonTitle: NoResultConstants.refreshButtonTitle) { [weak self] noResults in + let appDelegate = WordPressAppDelegate.shared + noResults.delegate = self - noResults.hideImageView() + noResults.hideImageView(appDelegate?.connectionAvailable ?? true) } } diff --git a/WordPress/Classes/ViewRelated/Stats/StatsViewController.m b/WordPress/Classes/ViewRelated/Stats/StatsViewController.m index 84f776e7e66e..e5cd48f3951d 100644 --- a/WordPress/Classes/ViewRelated/Stats/StatsViewController.m +++ b/WordPress/Classes/ViewRelated/Stats/StatsViewController.m @@ -111,7 +111,7 @@ - (void)addStatsViewControllerToView - (void)initStats { WordPressAppDelegate *appDelegate = [WordPressAppDelegate shared]; - if (!appDelegate.connectionAvailable) { + if (!appDelegate.connectionAvailable && ![Feature enabled:FeatureFlagStatsRefresh]) { [self showNoResults]; self.offline = YES; return;