From ff19f34ad09cd24360798f2ca145be6b4476399c Mon Sep 17 00:00:00 2001 From: Danqing Liu Date: Tue, 15 Oct 2024 13:32:21 -0400 Subject: [PATCH] Update InputBarAccessoryView.swift --- Sources/InputBarAccessoryView.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/InputBarAccessoryView.swift b/Sources/InputBarAccessoryView.swift index dbe47261..16890db0 100755 --- a/Sources/InputBarAccessoryView.swift +++ b/Sources/InputBarAccessoryView.swift @@ -654,17 +654,17 @@ open class InputBarAccessoryView: UIView { /// - animated: If the layout should be animated /// - animations: Animation logic internal func performLayout(_ animated: Bool, _ animations: @escaping () -> Void) { - DispatchQueue.main.async { - self.deactivateConstraints() + self.deactivateConstraints() - if animated { - DispatchQueue.main.async { - UIView.animate(withDuration: 0.3, animations: animations) - } - } else { - UIView.performWithoutAnimation { animations() } + if animated { + DispatchQueue.main.async { + UIView.animate(withDuration: 0.3, animations: animations) } + } else { + UIView.performWithoutAnimation { animations() } + } + DispatchQueue.main.async { self.activateConstraints() } }