File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class MessagesCollectionView: UICollectionView {
31
31
backgroundColor = . clear
32
32
delegate = coordinator
33
33
autoresizingMask = [ . flexibleHeight]
34
-
34
+ alwaysBounceVertical = true
35
35
register (
36
36
MessageCollectionViewCell . self,
37
37
forCellWithReuseIdentifier: MessageCollectionViewCell . reuseIdentifier
@@ -505,7 +505,7 @@ private extension MessagesCollectionView {
505
505
506
506
func scrollViewDidScroll( _ scrollView: UIScrollView ) {
507
507
let isAtBottom = scrollView. contentOffset. y > - 60
508
- if isAtBottom != wasPreviouslyAtBottom {
508
+ if isAtBottom != wasPreviouslyAtBottom, messages . count > 12 {
509
509
NotificationCenter . default. post (
510
510
name: . scrollToBottomChanged,
511
511
object: nil ,
You can’t perform that action at this time.
0 commit comments