@@ -158,7 +158,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
158158
159159 messageSendView.edgesToSuperview(excluding: [.top,.bottom])
160160
161− bottomConstraint = NSLayoutConstraint(item: messageSendView, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1, constant: 0)
161+ bottomConstraint = NSLayoutConstraint(item: messageSendView, attribute: .bottom, relatedBy: .equal, toItem: self.view.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1, constant: 0)
162162 view.addConstraint(bottomConstraint)
163163
164164 messageSendView.height(60)
@@ -172,7 +172,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
172172 messageTextView.edgesToSuperview(excluding: .right)
173173 messageTextView.rightToLeft(of: sendButton)
174174
175− tableView.edgesToSuperview(excluding: .bottom)
175+ tableView.edgesToSuperview(excluding: .bottom, insets: .top(self.navigationController?.navigationBar.frame.size.height ?? 0))
176176 tableView.bottomToTop(of: messageSendView)
177177
178178 self.view.layoutSubviews()
@@ -191,7 +191,7 @@ class DialogViewController: UIViewController, UpdatableGroup, UITableViewDelegat
191191
192192 let keyBoardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue
193193
194− bottomConstraint.constant = notification.name == UIResponder.keyboardWillShowNotification ? -(keyBoardFrame.height) : 0
194+ bottomConstraint.constant = notification.name == UIResponder.keyboardWillShowNotification ? -(keyBoardFrame.height) + self.view.safeAreaInsets.bottom : 0
195195
196196 UIView.animate(withDuration: 0, delay: 0, options: .curveEaseOut, animations: {
197197 self.view.layoutIfNeeded()