mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Refactor to see what SenderType would look like
This commit is contained in:
@@ -176,12 +176,12 @@ final class AdvancedExampleViewController: ChatViewController {
|
||||
|
||||
func isPreviousMessageSameSender(at indexPath: IndexPath) -> Bool {
|
||||
guard indexPath.section - 1 >= 0 else { return false }
|
||||
return messageList[indexPath.section].sender == messageList[indexPath.section - 1].sender
|
||||
return messageList[indexPath.section].user == messageList[indexPath.section - 1].user
|
||||
}
|
||||
|
||||
func isNextMessageSameSender(at indexPath: IndexPath) -> Bool {
|
||||
guard indexPath.section + 1 < messageList.count else { return false }
|
||||
return messageList[indexPath.section].sender == messageList[indexPath.section + 1].sender
|
||||
return messageList[indexPath.section].user == messageList[indexPath.section + 1].user
|
||||
}
|
||||
|
||||
func setTypingIndicatorHidden(_ isHidden: Bool, performUpdates updates: (() -> Void)? = nil) {
|
||||
|
||||
Reference in New Issue
Block a user