-
Notifications
You must be signed in to change notification settings - Fork 986
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
disable chat swipe back navigation in ios #16035
Conversation
Jenkins BuildsClick to see older builds (9)
|
I guess more robust solution would be to add this in or finding out why |
might be related to upgrade (if this behavior is new) |
I tested all scenarios that we found for the issue reproduction - none is working for me, so the issue is fixed from my POV. Thank you for jumping in and for amazing work, as always @Parveshdhull !
For now only images selection, all composer elements, chat options in future. What issues can is cause? |
src/status_im2/navigation/core.cljs
Outdated
@@ -51,6 +52,11 @@ | |||
(when-not @state/curr-modal | |||
(reset! state/pushed-screen-id view-id))))) | |||
|
|||
(navigation/reg-component-did-disappear-listener |
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.
unfortunately, this won't work, because did-disappear-listener
is very late, this is our pain point, we need to listen for swipe on ios, same how we do with back button on android
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.
so it will be possible to swipe quick and open chat, and did-disappear-listener
will happen and chat screen will be broken
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.
so it will be possible to swipe quick and open chat, and
did-disappear-listener
will happen and chat screen will be broken
Yes, this can be problematic. @churik please can you check if this is reproducible for you?
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.
it was reported before so its possible
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.
apparently this is known issue, and solution is to rely on navigation listeners (which doesn't work for us).
Another solution I can try is to call :chat/close on unmount
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.
yup it works, will push changes
Hi, they are fine, they are just modals. Issue will only happen if we open overlapping screen.
Chat will be closed, probably will show Unknown contact. |
1b3a714
to
a5dd2a5
Compare
Thank you very much @flexsurfer and @churik, pushed new solution. |
(rn/hw-back-remove-listener navigate-back-handler) | ||
(rn/hw-back-add-listener navigate-back-handler)) | ||
:component-will-unmount (fn [] (rn/hw-back-remove-listener navigate-back-handler)) | ||
{:component-will-unmount (fn [] (rf/dispatch [:chat/close])) |
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 don't remember why but this won't work as well, there are lots of edge cases., the only way is to dispatch on swipe :(
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.
the only way is to dispatch on swipe :(
Any suggestion on how to detect that?
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.
Means is there any event, or have to use gesture handler etc,?
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.
no probably its not possible, and i disabled swipe, but someone enabled 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.
btw, if its working for now, can we keep this solution for release? Because once #15893 is merged, we will have our own navigation for this screen, so don't need to rely on these events.
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.
can we keep this solution
its not a solution, its even worse, because chat will be broken
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.
Please can you create a PR for disabling swipe for ios, or point me in the direction. I am not finding option in navigation docs.
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.
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.
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.
Thank you
70% of end-end tests have passed
Failed tests (10)Click to expandClass TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMerged:
Passed tests (23)Click to expandClass TestActivityMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
|
a5dd2a5
to
7ebdf0c
Compare
85% of end-end tests have passed
Failed tests (5)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Class TestCommunityOneDeviceMerged:
Passed tests (28)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
|
Thanks for amazing work! We found one more way to reproduce this issue, but this flow is not that crucial, so ready to be merged. Devices:
|
7ebdf0c
to
908fcc4
Compare
fixes: #16034
Summary
While navigating back using swipe in ios,
navigate-back-handler
don't get called and chat never gets closed.Testing
So now we are remove chat from db, when chat screen is not visible, like going back to home screen.
Is there any other screen we can open without closing chat screen, like having chat screen in background?
In that case this solution might create problem. Please let me know if there are any such cases.
status: ready