AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
26.11k stars 2.26k forks source link

Fix InlineDictionary Behavior for Single Item Reassignment #17370

Closed lindexi closed 4 weeks ago

lindexi commented 1 month ago

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:

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:

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

MrJul commented 1 month 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 :)

avaloniaui-bot commented 1 month ago

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]

avaloniaui-bot commented 1 month ago

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]

lindexi commented 1 month ago

@MrJul Thank you for your review. And I updated my code.

avaloniaui-bot commented 1 month ago

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]