Skip to content

Commit

Permalink
Remove some redundant isPad checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Sep 13, 2024
1 parent f614eca commit d57b1ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ final class BlogDashboardPersonalizeCardCell: DashboardCollectionViewCell {
let viewController = UIHostingController(rootView: NavigationView {
BlogDashboardPersonalizationView(viewModel: .init(blog: blog, service: .init(siteID: siteID)))
}.navigationViewStyle(.stack)) // .stack is required for iPad
if UIDevice.isPad() {
viewController.modalPresentationStyle = .formSheet
}
viewController.modalPresentationStyle = .formSheet
presentingViewController?.present(viewController, animated: true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ extension HomeSiteHeaderViewController {
let viewController = UIHostingController(rootView: NavigationView {
BlogDashboardPersonalizationView(viewModel: .init(blog: self.blog, service: .init(siteID: siteID)))
}.navigationViewStyle(.stack)) // .stack is required for iPad
if UIDevice.isPad() {
viewController.modalPresentationStyle = .formSheet
}
viewController.modalPresentationStyle = .formSheet
present(viewController, animated: true)

WPAnalytics.trackEvent(.mySiteHeaderPersonalizeHomeTapped)
Expand Down

0 comments on commit d57b1ef

Please sign in to comment.