Skip to content

Commit

Permalink
Merge pull request #59 from michael-rapp/master
Browse files Browse the repository at this point in the history
Fix for issue #43 "mLastStableState was not set on setState"
  • Loading branch information
miguelhincapie authored Jun 6, 2018
2 parents 5898e11 + 58cd42d commit 4191caa
Showing 1 changed file with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,19 +588,17 @@ public final void setState( @State int state ) {
if ( state == mState ) {
return;
}
if ( mViewRef == null ) {
// The view is not laid out yet; modify mState and let onLayoutChild handle it later
/**
* New behavior (added: state == STATE_ANCHOR_POINT ||)
*/
if ( state == STATE_COLLAPSED || state == STATE_EXPANDED || state == STATE_ANCHOR_POINT ||
(mHideable && state == STATE_HIDDEN)) {
mState = state;
mLastStableState = state;
}
return;

/**
* New behavior (added: state == STATE_ANCHOR_POINT ||)
*/
if ( state == STATE_COLLAPSED || state == STATE_EXPANDED || state == STATE_ANCHOR_POINT ||
(mHideable && state == STATE_HIDDEN)) {
mState = state;
mLastStableState = state;
}
V child = mViewRef.get();

V child = mViewRef == null ? null : mViewRef.get();
if (child == null) {
return;
}
Expand Down

0 comments on commit 4191caa

Please sign in to comment.