@@ -1056,9 +1056,10 @@ function cancel_url_dialogs() {
10561056}
10571057
10581058// Manages URL routing and page transitions for iOS app integration
1059- function ios_redirections ( url ) {
1059+ function ios_redirections ( url , pwa ) {
10601060 if ( ! url ) return
1061- const query_string = get_search ( url ) ,
1061+ const app = ! pwa , // function is called from app
1062+ query_string = get_search ( url ) ,
10621063 url_params = parse_url_params ( query_string ) ;
10631064 if ( url_params . xss ) return
10641065 const current_url = glob_const . w_loc . href . toUpperCase ( ) ,
@@ -1089,11 +1090,11 @@ function ios_redirections(url) {
10891090 if ( is_opendialog ( ) ) {
10901091 canceldialog ( ) ;
10911092 setTimeout ( function ( ) {
1092- check_params ( url_params ) ;
1093+ check_params ( url_params , app ) ;
10931094 } , 1000 ) ;
10941095 return
10951096 }
1096- check_params ( url_params ) ;
1097+ check_params ( url_params , app ) ;
10971098}
10981099
10991100// (Can only be envoked from the IOS app), Configures app for iOS-specific behaviors and adds iOS identifier
@@ -4531,7 +4532,7 @@ function expand_shorturl(input_param) {
45314532 }
45324533 const cached_url = br_get_session ( "longurl_" + input_param ) ;
45334534 if ( cached_url ) { // check for cached values
4534- ios_redirections ( cached_url ) ;
4535+ ios_redirections ( cached_url , true ) ;
45354536 return
45364537 }
45374538 if ( input_param ) {
@@ -4565,7 +4566,7 @@ function expand_shorturl(input_param) {
45654566 const long_url = parsed_data . sharedurl ;
45664567 if ( long_url ) {
45674568 const local_url = make_local ( long_url ) ;
4568- ios_redirections ( local_url ) ;
4569+ ios_redirections ( local_url , true ) ;
45694570 br_set_session ( "longurl_" + input_param , local_url ) ;
45704571 return
45714572 }
@@ -4590,7 +4591,7 @@ function expand_bitly_url(input_param) {
45904591 const bitly_id = input_param . slice ( 3 ) ,
45914592 cached_url = br_get_session ( "longurl_" + bitly_id ) ;
45924593 if ( cached_url ) { // check for cached values
4593- ios_redirections ( cached_url ) ;
4594+ ios_redirections ( cached_url , true ) ;
45944595 return
45954596 }
45964597 api_proxy ( {
@@ -4615,7 +4616,7 @@ function expand_bitly_url(input_param) {
46154616 if ( parsed_data ) {
46164617 const long_url = parsed_data . long_url ;
46174618 if ( long_url ) {
4618- ios_redirections ( long_url ) ;
4619+ ios_redirections ( long_url , true ) ;
46194620 br_set_session ( "longurl_" + bitly_id , long_url ) ;
46204621 return
46214622 }
0 commit comments