@@ -169,7 +169,13 @@ extension AppDelegate {
169169
170170 // Support for subscribing to a feed URL
171171 JLRoutes . global ( ) . addRoute ( " /subscribe/* " ) { [ weak self] parameters -> Bool in
172- guard let strongSelf = self , let controller = SceneHelper . rootViewController ( ) , let subscribeUrl = ( parameters [ JLRouteURLKey] as? URL ) ? . absoluteString else { return false }
172+ guard
173+ let strongSelf = self ,
174+ let rootController = SceneHelper . rootViewController ( includeTopMost: false ) , //I don't want to consider the top most presented but the main root instead
175+ let subscribeUrl = ( parameters [ JLRouteURLKey] as? URL ) ? . absoluteString
176+ else {
177+ return false
178+ }
173179
174180 let prefix = " pktc://subscribe/ "
175181 if prefix. count >= subscribeUrl. count { return true } // this request is missing a URL
@@ -179,8 +185,8 @@ extension AppDelegate {
179185 let searchTerm = !feedUrl. hasPrefix ( " http:// " ) && !feedUrl. hasPrefix ( " https:// " ) ? " http:// \( feedUrl) " : feedUrl
180186
181187 strongSelf. progressDialog = ShiftyLoadingAlert ( title: L10n . podcastLoading)
182- controller . dismiss ( animated: false , completion: nil )
183- strongSelf. progressDialog? . showAlert ( controller , hasProgress: false , completion: {
188+ rootController . dismiss ( animated: false , completion: nil )
189+ strongSelf. progressDialog? . showAlert ( rootController , hasProgress: false , completion: {
184190 MainServerHandler . shared. podcastSearch ( searchTerm: searchTerm) { response in
185191 guard let uuid = response? . result? . podcast? . uuid else {
186192 DispatchQueue . main. async {
0 commit comments