Don't update constraints from StatusContentContainer.setCollapsed
This commit is contained in:
parent
421cb7ba03
commit
3b965b92f2
|
@ -130,12 +130,13 @@ class StatusContentContainer<ContentView: ContentTextView, PollView: StatusConte
|
|||
}
|
||||
isCollapsed = collapsed
|
||||
|
||||
// ensure that we have a lastSubviewBottomConstraint
|
||||
updateConstraintsIfNeeded()
|
||||
// force unwrap because the content container should always have at least one view
|
||||
lastSubviewBottomConstraint!.isActive = !collapsed
|
||||
// don't call setNeedsUpdateConstraints b/c that destroys/recreates a bunch of other constraints
|
||||
// if there is no lastSubviewBottomConstraint, then we already need a constraint update, so we don't need to do anything here
|
||||
if let lastSubviewBottomConstraint {
|
||||
lastSubviewBottomConstraint.isActive = !collapsed
|
||||
zeroHeightConstraint.isActive = collapsed
|
||||
}
|
||||
}
|
||||
|
||||
// used only for collapsing automatically based on height, doesn't need to be accurate
|
||||
// just roughly inline with the content height
|
||||
|
|
Loading…
Reference in New Issue