File tree Expand file tree Collapse file tree
WordPress/Classes/Utility/Universal Links Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ extension NavigationAction {
2626 return nil
2727 }
2828
29- func postFailureNotice( title: String ) {
29+ func postFailureNotice( title: String , message : String ? = nil ) {
3030 let notice = Notice ( title: title,
31+ message: message,
3132 feedbackType: . error,
3233 notificationInfo: nil )
3334 ActionDispatcher . dispatch ( NoticeAction . post ( notice) )
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ extension MySitesRoute: NavigationAction {
9393 }
9494 WPAppAnalytics . track ( . deepLinkFailed, withProperties: properties)
9595
96+ if campaign. flatMap ( AppBannerCampaign . init) == . qrCodeMedia {
97+ postFailureNotice ( title: Strings . siteNotFound, message: Strings . checkAccount)
98+ return
99+ }
100+
96101 if failAndBounce ( values) == false {
97102 coordinator. showRootViewController ( )
98103 postFailureNotice ( title: NSLocalizedString ( " Site not found " ,
@@ -131,3 +136,16 @@ extension MySitesRoute: NavigationAction {
131136 }
132137 }
133138}
139+
140+ private enum Strings {
141+ static let siteNotFound = NSLocalizedString (
142+ " universalLink.qrCodeMedia.error.title " ,
143+ value: " Site not found " ,
144+ comment: " Title for error notice shown if the app can't find a specific site belonging to the user "
145+ )
146+ static let checkAccount = NSLocalizedString (
147+ " universalLink.qrCodeMedia.error.message " ,
148+ value: " Check that you are logged into the correct account " ,
149+ comment: " Message for error notice shown if the app can't find a specific site belonging to the user "
150+ )
151+ }
You can’t perform that action at this time.
0 commit comments