Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Set typing indicator hidden inside performBatchUpdates to prevent flo…
…w layout from requesting message type from DataSource for typing indicator section.
  • Loading branch information
Zandor300 committed Jul 10, 2023
commit 83d652e375faacb1946db386d31058bcb4421496
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ extension MessagesViewController {
}

let section = messagesCollectionView.numberOfSections
messagesCollectionView.setTypingIndicatorViewHidden(isHidden)

if animated {
messagesCollectionView.performBatchUpdates({ [weak self] in
self?.messagesCollectionView.setTypingIndicatorViewHidden(isHidden)
self?.performUpdatesForTypingIndicatorVisability(at: section)
updates?()
}, completion: completion)
} else {
messagesCollectionView.setTypingIndicatorViewHidden(isHidden)
performUpdatesForTypingIndicatorVisability(at: section)
updates?()
completion?(true)
Expand Down