Page MenuHomePhabricator

[native] Migrate removeScreen listener in OverlayNavigator to Reanimated V2 API
ClosedPublic

Authored by angelika on Wed, Dec 11, 7:30 AM.
Tags
None
Referenced Files
F3492720: D14103.diff
Thu, Dec 19, 1:09 AM
Unknown Object (File)
Tue, Dec 17, 1:45 PM
Unknown Object (File)
Tue, Dec 17, 8:03 AM
Unknown Object (File)
Fri, Dec 13, 11:17 PM
Subscribers
None

Details

Summary

Previously in Animated.Code we were listening for changes in position value and if it's 0, that means the animation ended and we can remove the screen.
In Reanimated v2 we don't have Animated.Code so I used a callback passed to withTiming. When the animation finishes and the position is 0, then remove the screen.
Then removeScreen function now takes a key as an argument in order to pass nicely it to the withTiming callback, but it works the same.

Test Plan

Long press on messages and edit members, threads buttons to show some tooltips. Verify that the screens are correctly removed.

Depends on D14102

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

angelika held this revision as a draft.
This revision is now accepted and ready to land.Wed, Dec 11, 5:41 PM

Rebase and address feedback