diff --git a/Ring/Ring/Extensions/NotificationCenter+Ring.swift b/Ring/Ring/Extensions/NotificationCenter+Ring.swift index fbaf310b12a5ff769e561f055e80618e2aa916b6..086818bfce9bda2cf03013e1a9ccbf5812da5c11 100644 --- a/Ring/Ring/Extensions/NotificationCenter+Ring.swift +++ b/Ring/Ring/Extensions/NotificationCenter+Ring.swift @@ -27,7 +27,7 @@ extension NotificationCenter { .from([ NotificationCenter.default.rx.notification(NSNotification.Name.UIKeyboardWillShow) .map { notification -> CGFloat in - (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue.height ?? 0 + return (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue.height ?? 0 }, NotificationCenter.default.rx.notification(NSNotification.Name.UIKeyboardWillHide) .map { _ -> CGFloat in diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift index e50222d625916a8aed8f6f3ba128e49c779cde09..29119f927ca1c27ea60cbdaa9e3011a6b654e0dd 100644 --- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift +++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift @@ -64,7 +64,7 @@ class ConversationViewController: UIViewController, UITextFieldDelegate, Storybo Register to keyboard notifications to adjust tableView insets when the keybaord appears or disappears */ - NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(withNotification:)), name: NSNotification.Name.UIKeyboardDidShow, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(withNotification:)), name: NSNotification.Name.UIKeyboardWillShow, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(withNotification:)), name: NSNotification.Name.UIKeyboardWillHide, object: nil) } @@ -79,7 +79,7 @@ class ConversationViewController: UIViewController, UITextFieldDelegate, Storybo self.tableView.contentInset.bottom = keyboardHeight self.tableView.scrollIndicatorInsets.bottom = keyboardHeight - self.scrollToBottom(animated: true) + self.scrollToBottom(animated: false) self.updateBottomOffset() }