fix caption dismiss animation/placeholder for multiline message body

pull/1/head
Michael Kirk 7 years ago
parent 4f1f09f231
commit 0808458392

@ -740,13 +740,8 @@ extension AttachmentApprovalViewController: AttachmentPrepViewControllerDelegate
return return
} }
guard let firstObservedKeyboardHeight = firstObservedKeyboardHeight else {
owsFailDebug("firstObservedKeyboardHeight was unexpectedly nil")
return
}
view.addSubview(inputAccessorySnapshotView) view.addSubview(inputAccessorySnapshotView)
inputAccessorySnapshotView.autoSetDimension(.height, toSize: firstObservedKeyboardHeight) inputAccessorySnapshotView.autoSetDimension(.height, toSize: bottomToolView.bounds.height)
inputAccessorySnapshotView.autoPinEdgesToSuperviewEdges(with: .zero, excludingEdge: .top) inputAccessorySnapshotView.autoPinEdgesToSuperviewEdges(with: .zero, excludingEdge: .top)
} }
@ -779,7 +774,7 @@ extension AttachmentApprovalViewController: AttachmentPrepViewControllerDelegate
// the CaptionView nearer to the bottom edge than it's initial position, which should // the CaptionView nearer to the bottom edge than it's initial position, which should
// be the height of the inputAccessoryView. // be the height of the inputAccessoryView.
if let firstObservedKeyboardHeight = firstObservedKeyboardHeight { if let firstObservedKeyboardHeight = firstObservedKeyboardHeight {
return max(firstObservedKeyboardHeight, lastObservedKeyboardHeight) return max(bottomToolView.bounds.height, lastObservedKeyboardHeight)
} }
return lastObservedKeyboardHeight return lastObservedKeyboardHeight

Loading…
Cancel
Save