From 3ea1022284a7897a2f2447183661657ed010285e Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 1 May 2024 12:37:59 -0400 Subject: [PATCH] Fix view-site not working --- Podfile.lock | 2 +- RELEASE-NOTES.txt | 1 + .../ViewRelated/Post/PostNoticePublishSuccessView.swift | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 39e10ff20f63..f4440e678747 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -197,7 +197,7 @@ SPEC CHECKSUMS: Gifu: 416d4e38c4c2fed012f019e0a1d3ffcb58e5b842 Gravatar: 51437de6811c1d8d6f60c52985f2ca00a85cfc8e Gridicons: 4455b9f366960121430e45997e32112ae49ffe1d - Gutenberg: cd6259542b7078fe875d51b21c962d02bac6c032 + Gutenberg: 3117b6fe578fb7f0bb75377ba96f436ee05c30fe JTAppleCalendar: 16c6501b22cb27520372c28b0a2e0b12c8d0cd73 Kanvas: cc027f8058de881a4ae2b5aa5f05037b6d054d08 MediaEditor: d08314cfcbfac74361071a306b4bc3a39b3356ae diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 18006aac0ffa..ae4e4ffb41aa 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,6 +1,7 @@ 24.9 ----- * [*] Add "Parent Page" to "Page Settings" [#23136] +* [*] Make it easier to "Share" and "Blaze" a published post with an updated success view [##23128] 24.8 ----- diff --git a/WordPress/Classes/ViewRelated/Post/PostNoticePublishSuccessView.swift b/WordPress/Classes/ViewRelated/Post/PostNoticePublishSuccessView.swift index 58ddb889ab0a..699f3a2e79f5 100644 --- a/WordPress/Classes/ViewRelated/Post/PostNoticePublishSuccessView.swift +++ b/WordPress/Classes/ViewRelated/Post/PostNoticePublishSuccessView.swift @@ -93,7 +93,11 @@ struct PostNoticePublishSuccessView: View { } private func buttonOpenDomainTapped() { - guard let url = URL(string: post.blog.primaryDomainAddress) else { return } + guard let urlString = post.blog.homeURL as String?, + let url = URL(string: urlString) else { + return + } + WPAppAnalytics.track(.openedViewSite, withProperties: [WPAppAnalyticsKeyTapSource: "publish_success_view"], with: post.blog) UIApplication.shared.open(url) }