-
Notifications
You must be signed in to change notification settings - Fork 987
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
fix: hardware induced back actions #20183
Conversation
Jenkins BuildsClick to see older builds (57)
|
should we add some other teams as a reviewer to this pr because whatever approach we take for this we should probably standardise across the app? 🤔 |
c4263b0
to
fe25882
Compare
Hey @status-im/mobile-devs, I would appreciate someone from outside wallet having a look on this PR since that bug could be present in other parts of the app also. In this PR I fixed the |
Hi @OmarBasem, Thank you very much great work. PR lgtm 🎉
I don't think the community has any on-close callback. The current solution in PR looks ok to me, but if you check https://github.com/status-im/status-mobile/pull/13379/files we used approach of registering/removing I don't remember technical details about why we did that but I do remember there were a few edge cases related to chat screen when timing was important. Like quickly reopening the chat screen and maybe un-mount getting dispatched at wrong time or something and ending up with blank chat etc. So current solution works, but probably more robust solution is to registering/removing Probably @flexsurfer might have more info. |
yes, this might lead to issues when closing and opening screen |
Thanks for your input @Parveshdhull!
What about using swipe gesture on iOS? cc @flexsurfer |
Yes, ios is problematic. You can find more details in this PR reviews #16035. Initialy I also opted for |
Maybe we can use both solutions 🤔. that way atleast android will be robust. |
@Parveshdhull I think this is not ideal. Personally as an iOS user I always use gestures for navigating. I rarely use top bar buttons.
I don't think this is ideal either, it introduces complexities to the code. I think the way it is okay for now (I also think that exiting and re-entering the screen quickly is likely to happen more on chat screen than other screens). I have opened an issue to investigate that problem further and find a more robust solution that works on both platforms #20226 👍 |
37% of end-end tests have passed
Failed tests (29)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestDeepLinksOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestWalletMultipleDevice:
Expected to fail tests (4)Click to expandClass TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestWalletOneDevice:
Passed tests (19)Click to expandClass TestWalletOneDevice:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
fe25882
to
4a65605
Compare
Maybe we should remove the |
3eaf935
to
70e029a
Compare
Finally!! Thank you @VolodLytvynenko for your testing and patience also! :) |
* fix: hardware induced back actions (#20183)
fixes: #20182
Summary
This PR fixes hardware induced back actions in wallet. Currently we had the
on-close
function to be called when pressing on theX
button. This can cause bugs when navigation back using hardware button or swipe gesture. Theon-close
function need to be calledon-unmount
instead.Demo
Example fix: currently in develop when disabling a network on send-amount screen then navigation back with hardware button, then going to send screen again, the network will stay disabled. The below video shows fix for that:
Screen_Recording_20240527_101000_Status.mp4