@@ -56,18 +56,18 @@ final class HelpAndSupportViewController: UIViewController {
5656 ///
5757 var displaysDismissAction = false
5858
59- /// Custom help center web page's URL
59+ /// Custom help center web page related properties
6060 /// If non-nil this web page is launched instead of Zendesk
6161 ///
62- private let customHelpCenterURL : URL ?
62+ private let customHelpCenterContent : CustomHelpCenterContent ?
6363
64- init ? ( customHelpCenterURL : URL , coder: NSCoder ) {
65- self . customHelpCenterURL = customHelpCenterURL
64+ init ? ( customHelpCenterContent : CustomHelpCenterContent , coder: NSCoder ) {
65+ self . customHelpCenterContent = customHelpCenterContent
6666 super. init ( coder: coder)
6767 }
6868
6969 required init ? ( coder: NSCoder ) {
70- self . customHelpCenterURL = nil
70+ self . customHelpCenterContent = nil
7171 super. init ( coder: coder)
7272 }
7373
@@ -312,11 +312,11 @@ private extension HelpAndSupportViewController {
312312
313313 /// Opens custom help center URL in a web view
314314 ///
315- func launchCustomHelpCenterWebPage( url : URL ) {
316- WebviewHelper . launch ( url , with: self )
315+ func launchCustomHelpCenterWebPage( _ customHelpCenterContent : CustomHelpCenterContent ) {
316+ WebviewHelper . launch ( customHelpCenterContent . helpCenterContentURL , with: self )
317317
318318 ServiceLocator . analytics. track ( . supportHelpCenterViewed,
319- withProperties: [ " help_content_url " : url . absoluteString ] )
319+ withProperties: customHelpCenterContent . trackingProperties )
320320 }
321321}
322322
@@ -327,8 +327,8 @@ private extension HelpAndSupportViewController {
327327 /// Help Center action
328328 ///
329329 func helpCenterWasPressed( ) {
330- if let customHelpCenterURL = customHelpCenterURL {
331- launchCustomHelpCenterWebPage ( url : customHelpCenterURL )
330+ if let customHelpCenterContent = customHelpCenterContent {
331+ launchCustomHelpCenterWebPage ( customHelpCenterContent )
332332 } else {
333333 ZendeskProvider . shared. showHelpCenter ( from: self )
334334 }
0 commit comments