mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Fix fetch call won't occur for content smaller than bounds unless user scrolls
This commit is contained in:
@@ -20,7 +20,7 @@ BOOL ASDisplayShouldFetchBatchForContext(ASBatchContext *context,
|
||||
}
|
||||
|
||||
// only Down and Right scrolls are currently supported (tail loading)
|
||||
if (scrollDirection != ASScrollDirectionDown && scrollDirection != ASScrollDirectionRight) {
|
||||
if (!ASScrollDirectionContainsDown(scrollDirection) && !ASScrollDirectionContainsRight(scrollDirection)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ BOOL ASDisplayShouldFetchBatchForContext(ASBatchContext *context,
|
||||
|
||||
CGFloat viewLength, offset, contentLength;
|
||||
|
||||
if (scrollDirection == ASScrollDirectionDown) {
|
||||
if (ASScrollDirectionContainsDown(scrollDirection)) {
|
||||
viewLength = bounds.size.height;
|
||||
offset = targetOffset.y;
|
||||
contentLength = contentSize.height;
|
||||
} else { // horizontal
|
||||
} else { // horizontal / right
|
||||
viewLength = bounds.size.width;
|
||||
offset = targetOffset.x;
|
||||
contentLength = contentSize.width;
|
||||
|
||||
Reference in New Issue
Block a user