@@ -387,23 +387,19 @@ public let MessageInputBarHeight = CGFloat(52)
387387 let oldFrame = CGRect ( x: 0 , y: 0 , width: self . frame. width, height: self . frame. height- BottomBarHeight- MessageInputBarHeight)
388388 self . messageList. frame = oldFrame
389389 if firstResponder {
390- self . messageList. frame = CGRect ( x: 0 , y: 0 , width: self . messageList. frame. width, height: self . frame. height- self . inputBar. keyboardHeight- 16 - BottomBarHeight)
391-
392- let lastIndexPath = IndexPath ( row: self . messages. count - 1 , section: 0 )
393- if lastIndexPath. row >= 0 {
394- self . messageList. scrollToRow ( at: lastIndexPath, at: . bottom, animated: false )
395- }
390+ self . messageList. frame = CGRect ( x: 0 , y: 0 , width: self . messageList. frame. width, height: self . frame. height- self . inputBar. keyboardHeight- 16 - BottomBarHeight- ( ScreenHeight <= 667 ? 28 : 0 ) - ( self . inputBar. extensionMenus. isHidden ? 0 : 20 ) )
396391
397392 } else {
398393 if self . inputBar. frame. height > MessageInputBarHeight {
399394 self . messageList. frame = CGRect ( x: 0 , y: 0 , width: self . messageList. frame. width, height: self . frame. height- self . inputBar. frame. height- BottomBarHeight)
400395 } else {
401396 self . messageList. frame = oldFrame
402397 }
403- let lastIndexPath = IndexPath ( row: self . messages. count - 1 , section: 0 )
404- if lastIndexPath. row >= 0 {
405- self . messageList. scrollToRow ( at: lastIndexPath, at: . bottom, animated: false )
406- }
398+ }
399+
400+ let lastIndexPath = IndexPath ( row: self . messages. count - 1 , section: 0 )
401+ if lastIndexPath. row >= 0 {
402+ self . messageList. scrollToRow ( at: lastIndexPath, at: . bottom, animated: false )
407403 }
408404 }
409405 }
0 commit comments