universal link fix

fix for universal link not opening properly when app was closed with
back button, returning nil instead of the url

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2020-04-14 14:06:57 +02:00
parent 5608d649b0
commit 35dd4b015b
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
1 changed files with 7 additions and 3 deletions

View File

@ -183,9 +183,13 @@
and handles incoming url if the app has been started by clicking on a link"
[]
(log/debug "universal-links: initializing")
(.. react/linking
;;NOTE: https://github.com/facebook/react-native/issues/15961
;; workaround for getInitialURL returning null when opening the
;; app from a universal link after closing it with the back button
(js/setTimeout #(.. react/linking
(getInitialURL)
(then dispatch-url))
200)
(.. react/linking
(addEventListener "url" url-event-listener)))