Skip to content

Commit

Permalink
Update changelog + format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothé Larivière committed Feb 19, 2024
1 parent e89681a commit 4148e18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

_No unreleased changes_

## [2.5.0-pre11] - 2024-02-19

### Fixed
- Recreate component on arg change by @TimLariviere (https://github.com/fabulous-dev/Fabulous/pull/1069)

## [2.5.0-pre10] - 2024-02-19

### Fixed
Expand Down Expand Up @@ -105,7 +110,8 @@ _No unreleased changes_
### Changed
- Fabulous.XamarinForms & Fabulous.MauiControls have been moved been out of the Fabulous repository. Find them in their own repositories: [https://github.com/fabulous-dev/Fabulous.XamarinForms](https://github.com/fabulous-dev/Fabulous.XamarinForms) / [https://github.com/fabulous-dev/Fabulous.MauiControls](https://github.com/fabulous-dev/Fabulous.MauiControls)

[unreleased]: https://github.com/fabulous-dev/Fabulous/compare/2.5.0-pre10...HEAD
[unreleased]: https://github.com/fabulous-dev/Fabulous/compare/2.5.0-pre11...HEAD
[2.5.0-pre11]: https://github.com/fabulous-dev/Fabulous/releases/tag/2.5.0-pre11
[2.5.0-pre10]: https://github.com/fabulous-dev/Fabulous/releases/tag/2.5.0-pre10
[2.5.0-pre9]: https://github.com/fabulous-dev/Fabulous/releases/tag/2.5.0-pre9
[2.5.0-pre8]: https://github.com/fabulous-dev/Fabulous/releases/tag/2.5.0-pre8
Expand Down
6 changes: 3 additions & 3 deletions src/Fabulous/MvuComponent.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ module MvuComponent =

let Data =
Attributes.defineSimpleScalar<MvuComponentData> "MvuComponent_Data" ScalarAttributeComparers.noCompare (fun _ _ _ -> ())

let canReuseMvuComponent (prev: Widget) (curr: Widget) =
let prevData =
match prev.ScalarAttributes with
| ValueSome attrs when attrs.Length > 0 -> attrs[0].Value :?> MvuComponentData
| _ -> failwith "Component widget must have a body"

let currData =
match curr.ScalarAttributes with
| ValueSome attrs when attrs.Length > 0 -> attrs[0].Value :?> MvuComponentData
| _ -> failwith "Component widget must have a body"

// NOTE: Somehow using = here crashes the app and prevents debugging...
Object.Equals(prevData.Arg, currData.Arg)

Expand Down

0 comments on commit 4148e18

Please sign in to comment.