HomePhabricator
Diffusion Comm a5611d3ba62e

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

Description

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

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

Reviewers: ashoat, tomek

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D14103

Details