Commit 0884fac0 authored by Steven杜宇's avatar Steven杜宇

// AI

parent 91244bed
......@@ -347,6 +347,7 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if 0 <= indexPath.row, indexPath.row < messages.count {
let message = messages[indexPath.row]
let msgType = message.getType()
if !message.isTextMessage() {
......@@ -365,7 +366,7 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
textHeight = 20.0
}
if message.isSelf || message.getType() == .recommendText {
if message.isSelf || msgType == .recommendText {
return textHeight + 16.0*2 + 16.0
}
......@@ -386,6 +387,9 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
return resultHeight
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 16.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment