@@ -299,8 +299,8 @@ extension ChatViewController: UIScrollViewDelegate {
299
299
return
300
300
}
301
301
// Reloading the content without animation just because it looks better is the scrolling is in process.
302
- let animated = !self . isUserInitiatedScrolling
303
- self . processUpdates ( with: sections, animated: animated, requiresIsolatedProcess: false ) {
302
+ let animated = !isUserInitiatedScrolling
303
+ processUpdates ( with: sections, animated: animated, requiresIsolatedProcess: false ) {
304
304
self . currentControllerActions. options. remove ( . loadingPreviousMessages)
305
305
}
306
306
}
@@ -329,12 +329,12 @@ extension ChatViewController: UIScrollViewDelegate {
329
329
guard let self else {
330
330
return
331
331
}
332
- self . collectionView. contentOffset = CGPoint ( x: self . collectionView. contentOffset. x, y: initialOffset + ( delta * percentage) )
332
+ collectionView. contentOffset = CGPoint ( x: collectionView. contentOffset. x, y: initialOffset + ( delta * percentage) )
333
333
if percentage == 1.0 {
334
- self . animator = nil
334
+ animator = nil
335
335
let positionSnapshot = ChatLayoutPositionSnapshot ( indexPath: IndexPath ( item: 0 , section: 0 ) , kind: . footer, edge: . bottom)
336
- self . chatLayout. restoreContentOffset ( with: positionSnapshot)
337
- self . currentInterfaceActions. options. remove ( . scrollingToBottom)
336
+ chatLayout. restoreContentOffset ( with: positionSnapshot)
337
+ currentInterfaceActions. options. remove ( . scrollingToBottom)
338
338
completion ? ( )
339
339
}
340
340
}
@@ -461,7 +461,7 @@ extension ChatViewController: ChatControllerDelegate {
461
461
guard let self else {
462
462
return
463
463
}
464
- self . processUpdates ( with: sections, animated: animated, requiresIsolatedProcess: requiresIsolatedProcess, completion: completion)
464
+ processUpdates ( with: sections, animated: animated, requiresIsolatedProcess: requiresIsolatedProcess, completion: completion)
465
465
} )
466
466
currentInterfaceActions. add ( reaction: reaction)
467
467
return
@@ -599,10 +599,10 @@ extension ChatViewController: InputBarAccessoryViewDelegate {
599
599
return
600
600
}
601
601
guard let messageText else {
602
- self . currentInterfaceActions. options. remove ( . sendingMessage)
602
+ currentInterfaceActions. options. remove ( . sendingMessage)
603
603
return
604
604
}
605
- self . scrollToBottom ( completion: {
605
+ scrollToBottom ( completion: {
606
606
self . chatController. sendMessage ( . text( messageText) ) { sections in
607
607
self . currentInterfaceActions. options. remove ( . sendingMessage)
608
608
self . processUpdates ( with: sections, animated: true , requiresIsolatedProcess: false )
0 commit comments