Skip to content

Commit

Permalink
Reset height (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahsmartin authored Mar 7, 2024
1 parent 544df02 commit b5ecd86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SnapshotPreviewsCore/ExpandingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public final class ExpandingViewController: UIHostingController<AnyView> {
widthAnchor?.isActive = false
heightAnchor = nil
widthAnchor = nil
previousHeight = nil
}

public func setupView(layout: PreviewLayout) {
Expand Down Expand Up @@ -114,7 +115,7 @@ public final class ExpandingViewController: UIHostingController<AnyView> {

public func updateScrollViewHeight() {
// If heightAnchor isn't set, this was a fixed size and we don't expand the scroll view
guard let heightAnchor else {
guard let heightAnchor, expansionSettled != nil else {
runCallback()
return
}
Expand Down

0 comments on commit b5ecd86

Please sign in to comment.