Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Android,Fabric): invalid behaviour of fitToContents sheet detent #2398

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Oct 10, 2024

Description

Fixes invalid behaviour of fitToContents sheet detent on Fabric.

The erroneous behaviour has been caused by different order of updates on Fabric relative to Paper.
On Fabric onCreateView (the place where bottom sheet behaviour is created) is called much later,
Because of this the layoutCallback from ScreenContentWrapper fails to set proper sheet height,
as the sheetBehaviour is still null.

Changes

Screen now keeps weak reference to ScreenContentWrapper and queries it when needed during behaviour configuration.

Test code and steps to reproduce

Test1649, chante sheetInitialDetents to fitToContents and see that it now works on Fabric.

Checklist

  • Included code example that can be used to test this change
  • [-] Ensured that CI passes

@kkafar kkafar requested a review from alduzy October 10, 2024 11:09
@kkafar kkafar merged commit dbf4cc8 into main Oct 10, 2024
4 checks passed
@kkafar kkafar deleted the @kkafar/fix-fittocontents-on-fabric branch October 10, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant