Skip to content

Commit 04ede57

Browse files
committed
Allow scrolling if the content size is smaller than the scroll view
1 parent d09874d commit 04ede57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apple/InlineIOS/Chat/MessagesCollectionView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MessagesCollectionView: UICollectionView {
3131
backgroundColor = .clear
3232
delegate = coordinator
3333
autoresizingMask = [.flexibleHeight]
34-
34+
alwaysBounceVertical = true
3535
register(
3636
MessageCollectionViewCell.self,
3737
forCellWithReuseIdentifier: MessageCollectionViewCell.reuseIdentifier
@@ -505,7 +505,7 @@ private extension MessagesCollectionView {
505505

506506
func scrollViewDidScroll(_ scrollView: UIScrollView) {
507507
let isAtBottom = scrollView.contentOffset.y > -60
508-
if isAtBottom != wasPreviouslyAtBottom {
508+
if isAtBottom != wasPreviouslyAtBottom, messages.count > 12 {
509509
NotificationCenter.default.post(
510510
name: .scrollToBottomChanged,
511511
object: nil,

0 commit comments

Comments
 (0)