Skip to content

Commit

Permalink
Merge pull request #259 from AuroraZiling/main
Browse files Browse the repository at this point in the history
[Fix] `TransitioningContentControl` crushes when a view attaches visual tree many times
  • Loading branch information
kikipoulet authored Aug 6, 2024
2 parents bc4c7d9 + d323bc7 commit 9f4e3c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SukiUI/Controls/SukiTransitioningContentControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ public void PushContent(object? content)
_animCancellationToken.Cancel();
_animCancellationToken.Dispose();
_animCancellationToken = new CancellationTokenSource();

FirstBuffer = null;
SecondBuffer = null;

if (_isFirstBufferActive) SecondBuffer = content;
else FirstBuffer = content;
Expand Down

0 comments on commit 9f4e3c6

Please sign in to comment.