Skip to content

Commit

Permalink
small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMisiukevich committed Aug 31, 2018
1 parent 9174ca6 commit 1d6d833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ExpandableView/ExpandableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ExpandableView : StackLayout

public static readonly BindableProperty IsTouchToExpandEnabledProperty = BindableProperty.Create(nameof(IsTouchToExpandEnabled), typeof(bool), typeof(ExpandableView), true);

public static readonly BindableProperty SecondaryViewHeightRequestProperty = BindableProperty.Create(nameof(SecondaryViewHeightRequest), typeof(double), typeof(ExpandableView), 0.0);
public static readonly BindableProperty SecondaryViewHeightRequestProperty = BindableProperty.Create(nameof(SecondaryViewHeightRequest), typeof(double), typeof(ExpandableView), -1.0);

public static readonly BindableProperty ExpandAnimationLengthProperty = BindableProperty.Create(nameof(ExpandAnimationLength), typeof(uint), typeof(ExpandableView), 250u);

Expand Down Expand Up @@ -157,7 +157,7 @@ private void OnIsExpandedChanged()
}

_startHeight = 0;
_endHeight = SecondaryViewHeightRequest > 0
_endHeight = SecondaryViewHeightRequest >= 0
? SecondaryViewHeightRequest
: _lastVisibleHeight;

Expand All @@ -174,7 +174,7 @@ private void OnIsExpandedChanged()
}
else
{
_lastVisibleHeight = _startHeight = SecondaryViewHeightRequest > 0
_lastVisibleHeight = _startHeight = SecondaryViewHeightRequest >= 0
? SecondaryViewHeightRequest
: !isExpanding
? SecondaryView.Height
Expand Down

0 comments on commit 1d6d833

Please sign in to comment.