1- import Foundation
1+ import UIKit
22import BuildSettingsKit
33import WordPressUI
4- import UIKit
4+ import WordPressKit
55import WordPressShared
66import AutomatticAbout
77import SwiftUI
@@ -43,13 +43,13 @@ class AppAboutScreenConfiguration: AboutScreenConfiguration {
4343 } ) ,
4444 AboutItem ( title: TextContent . share, action: { [ weak self] context in
4545 self ? . tracker. buttonPressed ( . share)
46- self ? . sharePresenter. present ( for: AppConstants . shareAppName, in: context. viewController, source: . about, sourceView: context. sourceView)
46+ self ? . sharePresenter. present ( for: BuildSettings . current . shareAppName, in: context. viewController, source: . about, sourceView: context. sourceView)
4747 } ) ,
48- AboutItem ( title: TextContent . twitter, subtitle: AppConstants . productTwitterHandle , cellStyle: . value1, action: { [ weak self] context in
48+ AboutItem ( title: TextContent . twitter, subtitle: BuildSettings . current . about . twitterHandle , cellStyle: . value1, action: { [ weak self] context in
4949 self ? . tracker. buttonPressed ( . twitter)
5050 self ? . webViewPresenter. presentInNavigationControlller ( url: Links . twitter, context: context)
5151 } ) ,
52- AboutItem ( title: Strings . current. blogName, subtitle: AppConstants . productBlogDisplayURL, cellStyle: . value1, action: { [ weak self] context in
52+ AboutItem ( title: Strings . current. blogName, subtitle: productBlogDisplayURL, cellStyle: . value1, action: { [ weak self] context in
5353 self ? . tracker. buttonPressed ( . blog)
5454 self ? . webViewPresenter. presentInNavigationControlller ( url: Links . blog, context: context)
5555 } )
@@ -93,6 +93,11 @@ class AppAboutScreenConfiguration: AboutScreenConfiguration {
9393 self . sharePresenter = sharePresenter
9494 }
9595
96+ private var productBlogDisplayURL : String {
97+ let blogURL = BuildSettings . current. about. blogURL
98+ return [ blogURL. host, blogURL. path] . compactMap { $0 } . joined ( )
99+ }
100+
96101 private enum TextContent {
97102 static let rateUs = NSLocalizedString ( " Rate Us " , comment: " Title for button allowing users to rate the app in the App Store " )
98103 static let share = NSLocalizedString ( " Share with Friends " , comment: " Title for button allowing users to share information about the app with friends, such as via Messages " )
@@ -103,8 +108,8 @@ class AppAboutScreenConfiguration: AboutScreenConfiguration {
103108 }
104109
105110 private enum Links {
106- static let twitter = URL ( string : AppConstants . productTwitterURL ) !
107- static let blog = URL ( string : AppConstants . productBlogURL ) !
111+ static let twitter = BuildSettings . current . about . twitterURL
112+ static let blog = BuildSettings . current . about . blogURL
108113 static let workWithUs = URL ( string: Strings . current. workWithUsURL) !
109114 static let automattic = URL ( string: " https://automattic.com " ) !
110115 }
@@ -168,6 +173,15 @@ class LegalAndMoreSubmenuConfiguration: AboutScreenConfiguration {
168173 }
169174}
170175
176+ extension BuildSettings {
177+ var shareAppName : ShareAppName {
178+ switch brand {
179+ case . wordpress: . wordpress
180+ case . jetpack: . jetpack
181+ }
182+ }
183+ }
184+
171185private struct Strings {
172186 var blogName : String
173187 var workWithUs : String
0 commit comments