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
F3511227: D14103.id46321.diff
Sat, Dec 21, 2:04 PM
F3509944: D14103.id46464.diff
Sat, Dec 21, 9:38 AM
F3509096: D14103.id46402.diff
Sat, Dec 21, 1:05 AM
F3507195: D14103.id46322.diff
Fri, Dec 20, 7:39 PM
Unknown Object (File)
Fri, Dec 20, 2:05 PM
Unknown Object (File)
Fri, Dec 20, 12:52 AM
Unknown Object (File)
Fri, Dec 20, 12:07 AM
Unknown Object (File)
Thu, Dec 19, 11:19 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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