Flip condition to reduce nesting

This commit is contained in:
smoogipoo 2020-08-27 23:09:54 +09:00
parent 157e1d8965
commit 29b29cde8e
1 changed files with 18 additions and 18 deletions

View File

@ -101,8 +101,9 @@ private void onIsHittingChanged(ValueChangedEvent<bool> isHitting)
bodyAnimation.IsPlaying = isHitting.NewValue;
}
if (lightContainer != null)
{
if (lightContainer == null)
return;
if (isHitting.NewValue)
{
// Clear the fade out and, more importantly, the removal.
@ -124,7 +125,6 @@ private void onIsHittingChanged(ValueChangedEvent<bool> isHitting)
.OnComplete(d => Column.TopLevelContainer.Remove(d));
}
}
}
private void onDirectionChanged(ValueChangedEvent<ScrollingDirection> direction)
{