Closed lindexi closed 4 weeks ago
Thank you! Could you please add a matching unit test to the InlineDictionaryTests
? There isn't a lot of test coverage for this class currently, but we should at least cover fixed bugs :)
You can test this PR using the following package version. 11.3.999-cibuild0052850-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.3.999-cibuild0052852-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
@MrJul Thank you for your review. And I updated my code.
You can test this PR using the following package version. 11.3.999-cibuild0052893-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
What does the pull request do?
This PR addresses an issue with the
InlineDictionary
when handling reassignment of a single item.What is the current behavior?
Current Behavior:
Set
method was called, it ignored theoverwrite
parameter if the dictionary contained only one item.Set
method to behave like theAdd
method, leading to unexpected behavior in composition animations.See https://github.com/AvaloniaUI/Avalonia/blob/68a626f678b7fa4b1d1497cf7f419f7aebf703ee/src/Avalonia.Base/Rendering/Composition/Server/ServerObjectAnimations.cs#L109-L120
What is the updated/expected behavior with this PR?
Updated Behavior:
InlineDictionary
now respects theoverwrite
parameter even when it contains only one item.How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes https://github.com/AvaloniaUI/Avalonia/issues/17368