-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent crash when there is no appearance model built (#2375)
## Description I haven't investigated it carefully, but there were case when updating `sheetCornerRadius` the appearance model has not been built yet leading to a crash when casting to a non-null type. Additionally, this PR prevents calls to `onSheetCornerRadiusUpdate` when not in `formSheet` presentation or not in native stack. ## Changes * Prevent calls to `onSheetCornerRadiusUpdate` when not in `formSheet` presentation. * Check for nullish view background before attempt to set the corner radius. * Update the corner radius after all updates are applied, so that the `stackPresentation` has change of being updated. ## Test code and steps to reproduce `Test1649`. Try setting the corner radius now, should work properly. ## Checklist - [x] Included code example that can be used to test this change - [ ] Ensured that CI passes
- Loading branch information
Showing
3 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters