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

Commit 63a30c7

Browse files
authored
Init previousState field with LayoutState.None (#1122)
* Init previousState field with LayoutState.None * make previousState non nullable
1 parent e9d6e24 commit 63a30c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CommunityToolkit/Xamarin.CommunityToolkit/Views/StateLayout/StateLayoutController.shared.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class StateLayoutController
1111
{
1212
readonly WeakReference<Layout<View>> layoutWeakReference;
1313
bool layoutIsGrid;
14-
LayoutState? previousState;
14+
LayoutState previousState = LayoutState.None;
1515
IList<View> originalContent = Enumerable.Empty<View>().ToList();
1616
CancellationTokenSource? animationTokenSource;
1717

@@ -233,4 +233,4 @@ CancellationToken RebuildAnimationTokenSource(Layout<View> layout)
233233
return animationTokenSource.Token;
234234
}
235235
}
236-
}
236+
}

0 commit comments

Comments
 (0)