HomePhabricator
Diffusion Comm b1b539881381

[native] Lift cancelButtonExpansion to ChatThreadList

Description

[native] Lift cancelButtonExpansion to ChatThreadList

Summary:
ChatThreadList can actually render ChatThreadListSearch in two different places: inside the FlatList, and right above it.

We render it inside the FlatList to start, but when the user focuses the search bar, we "dock" it so that the user can still see it while they scroll through the search results.

If we don't lift cancelButtonExpansion, the dismissal animation doesn't work, because it's initiated on a component that is then unmounted.

By lifting this SharedValue, we allow it to be shared between the two components that are mounted in different places.

Depends on D12166

Test Plan: Confirm that the dismiss animation actually works by overriding it to take 3 seconds

Reviewers: inka

Reviewed By: inka

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 24 2024, 7:35 AM
Reviewer
inka
Differential Revision
D12210: [native] Lift cancelButtonExpansion to ChatThreadList
Parents
rCOMMf568e35457c9: [native] Convert ChatThreadListSearch to Reanimated 2 syntax
Branches
Unknown
Tags
Unknown