diff --git a/Session/Shared/SessionTableViewController.swift b/Session/Shared/SessionTableViewController.swift index 0e690f18b9..3c0096f56c 100644 --- a/Session/Shared/SessionTableViewController.swift +++ b/Session/Shared/SessionTableViewController.swift @@ -471,11 +471,15 @@ class SessionTableViewController: BaseVC, UITableViewDataSource, UITa cell.update( with: info, tableSize: tableView.bounds.size, - onToggleExpansion: { + onToggleExpansion: { [dependencies = viewModel.dependencies] in + UIView.setAnimationsEnabled(false) cell.setNeedsLayout() cell.layoutIfNeeded() tableView.beginUpdates() tableView.endUpdates() + if dependencies[feature: .animationsEnabled] { + UIView.setAnimationsEnabled(true) + } }, using: viewModel.dependencies ) diff --git a/SessionUIKit/Components/ConfirmationModal.swift b/SessionUIKit/Components/ConfirmationModal.swift index 47ed868a86..4acf0636c5 100644 --- a/SessionUIKit/Components/ConfirmationModal.swift +++ b/SessionUIKit/Components/ConfirmationModal.swift @@ -663,15 +663,13 @@ public class ConfirmationModal: Modal, UITextFieldDelegate, UITextViewDelegate { } @objc internal func textFieldClearButtonTapped() { - self.textField.text = "" + textField.text = "" + internalOnTextChanged?((textField.text ?? ""), textView.text) } @objc internal func textViewClearButtonTapped() { - self.textView.text = "" - textViewHeightConstraint?.constant = textViewMinHeight - UIView.animate(withDuration: 0.2) { - self.view.layoutIfNeeded() - } + textView.text = "" + textViewDidChange(textView) } // MARK: - Keyboard Avoidance