File tree 1 file changed +7
-12
lines changed
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -66,18 +66,13 @@ function openOldDotLink(url) {
66
66
}
67
67
68
68
// If shortLivedAuthToken is not accessible, fallback to opening the link without the token.
69
- // eslint-disable-next-line rulesdir/no-api-side-effects-method
70
- API . makeRequestWithSideEffects ( 'OpenOldDotLink' , { } , { } )
71
- . then ( ( response ) => {
72
- buildOldDotURL ( url , response . shortLivedAuthToken ) . then ( ( oldDotUrl ) => {
73
- Linking . openURL ( oldDotUrl ) ;
74
- } ) ;
75
- } )
76
- . catch ( ( ) => {
77
- buildOldDotURL ( url ) . then ( ( oldDotUrl ) => {
78
- Linking . openURL ( oldDotUrl ) ;
79
- } ) ;
80
- } ) ;
69
+ asyncOpenURL (
70
+ // eslint-disable-next-line rulesdir/no-api-side-effects-method
71
+ API . makeRequestWithSideEffects ( 'OpenOldDotLink' , { } , { } )
72
+ . then ( ( response ) => buildOldDotURL ( url , response . shortLivedAuthToken ) )
73
+ . catch ( ( ) => buildOldDotURL ( url ) ) ,
74
+ ( oldDotURL ) => oldDotURL ,
75
+ ) ;
81
76
}
82
77
83
78
/**
You can’t perform that action at this time.
0 commit comments