Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Fix Expander crash when Direction changed #1147

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void OnIsExpandedChanged(bool shouldIgnoreAnimation = false)
InvokeAnimation(startSize, endSize, shouldIgnoreAnimation);
}

void SetHeader(View oldHeader)
void SetHeader(View? oldHeader)
{
if (oldHeader != null)
{
Expand Down Expand Up @@ -397,8 +397,6 @@ void SetContent()

void SetDirection(ExpandDirection oldDirection)
{
_ = Header ?? throw new InvalidOperationException($"{nameof(Header)} not initialized");

if (oldDirection.IsVertical() == Direction.IsVertical())
{
SetHeader(Header);
Expand Down