Virtual detector native gestures#3765
Conversation
There was a problem hiding this comment.
I'm curious, why did the order of attach/detach change?
There was a problem hiding this comment.
If you follow the logic in updateLogicDetector closely you find out that if a specific handler was previously attached to another view, which was then detached (like in the example) - due to how handlers are stored - they would first be attached to the new view and then detached completely while looping through logicChildrenToDetach. I thought that it also happens in attachHandlers, but after careful testing it is not the case. I also fixed it on android today. For some reason I can't replicate it on web, I have to dig into that.
There was a problem hiding this comment.
I'm not sure what is updateLogicDetector.
There was a problem hiding this comment.
I could not replicate the same issue on web due to how views are reused there, but I decided to add a similar fix to be safe.
j-piasecki
left a comment
There was a problem hiding this comment.
Please also merge the next branch
|
|
||
| return () => { | ||
| if (tag != null) { | ||
| unregister(viewTag); |
There was a problem hiding this comment.
| unregister(viewTag); | |
| unregister(tag); |
I assume this shouldn't be unregistering for the old view tag.
342c019 to
c06d53e
Compare
Description
This PR makes
VirtualDetectorcompatible with native gestures. Back in #3689 I decided to handleVirtualDetectorcompatibility with native gestures for later, as it is a extremely niche feature and it seemed to require a lot of work. Turns out it doesn't, beacause we use wrap in VirtualDetector we can handle them as normal gestures.Test plan
Tested on:
Details