-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error alert after navigating to external links from app #20177 #20193
Error alert after navigating to external links from app #20177 #20193
Conversation
Jenkins BuildsClick to see older builds (6)
|
1e46017
to
fc3c96b
Compare
(.openURL ^js react/linking (url/normalize-url url)))))) | ||
(do | ||
(.openURL ^js react/linking (url/normalize-url url)) | ||
nil))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder do we need a comment or even to put nil
in an explanatory def 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning an map/nil is part of the declaration of events. I don't think it's needed 🤔 But let me know if you want me to add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Np for me either way, just wanted to raise the question. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openURL
is a function with side-effects and shouldn't be part of the event handler. There should be a re-frame effect wrapping this, so that we could do:
{:fx [...
[:linking/open-url (url/normalize-url url)]]}
Probably better would be to also put the normalize-url
call inside the effect since it's probably always desirable as far as I checked the code now. With the effect we won't have to worry about returning nil.
The new effect could be like this:
{:fx [...
[:linking/open-url [url {:normalize? true}]]
...]}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilmotta Done. Please check again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @mmilad75, LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one @mmilad75! 🚀
83% of end-end tests have passed
Failed tests (5)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Class TestWalletMultipleDevice:
Expected to fail tests (4)Click to expandClass TestWalletOneDevice:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (43)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestWalletOneDevice:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePRTwo:
|
60% of end-end tests have passed
Failed tests (2)Click to expandClass TestWalletMultipleDevice:
Passed tests (3)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
|
hi @mmilad75 Thank you for PR. No issues from my side. Ready to be merged |
fixes #20177
The issue was because the event was void, which should've returned an object. But in this case, since there were no objects required to be returned, I added nil as the return value
Screen.Recording.2024-05-27.at.16.27.46.mov