Skip to content

Commit

Permalink
Update prompt card on when user pulls to refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdchr committed Apr 4, 2023
1 parent 1a16b2d commit ec46207
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
self.sitePickerViewController?.blogDetailHeaderView.blog = blog
self.blogDashboardViewController?.reloadCardsLocally()
}

/// Update today's prompt if the blog has blogging prompts enabled.
fetchPrompt(for: blog)
}

WPAnalytics.track(.mySitePullToRefresh, properties: [WPAppAnalyticsKeyTabSource: section.analyticsDescription])
Expand Down Expand Up @@ -961,7 +964,13 @@ class MySiteViewController: UIViewController, NoResultsViewHost {
guard FeatureFlag.bloggingPrompts.enabled,
let blog = blog,
blog.isAccessibleThroughWPCom(),
let promptsService = BloggingPromptsService(blog: blog) else {
let promptsService = BloggingPromptsService(blog: blog),
let siteID = blog.dotComID?.intValue else {
return
}

let dashboardPersonalization = BlogDashboardPersonalizationService(siteID: siteID)
guard dashboardPersonalization.isEnabled(.prompts) else {
return
}

Expand Down

0 comments on commit ec46207

Please sign in to comment.