{"action":"opened","number":1141,"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141","id":57560423,"html_url":"https://github.com/facebook/AsyncDisplayKit/pull/1141","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/1141.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/1141.patch","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1141","number":1141,"state":"open","locked":false,"title":"[ASBatchFetching] Support head fetching","user":{"login":"tomizimobile","id":7967500,"avatar_url":"https://avatars.githubusercontent.com/u/7967500?v=3","gravatar_id":"","url":"https://api.github.com/users/tomizimobile","html_url":"https://github.com/tomizimobile","followers_url":"https://api.github.com/users/tomizimobile/followers","following_url":"https://api.github.com/users/tomizimobile/following{/other_user}","gists_url":"https://api.github.com/users/tomizimobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tomizimobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomizimobile/subscriptions","organizations_url":"https://api.github.com/users/tomizimobile/orgs","repos_url":"https://api.github.com/users/tomizimobile/repos","events_url":"https://api.github.com/users/tomizimobile/events{/privacy}","received_events_url":"https://api.github.com/users/tomizimobile/received_events","type":"User","site_admin":false},"body":"I created this to support a chat-like tableView or collectionView where the content stays focused at the bottom, and old messages are fetched as you scroll up. This changes the existing delegate methods related to batch fetching to include a parameter `atTail` so that you can easily choose to fetch at the head, tail, or both. \r\n\r\nIt doesn't look like there's a way in ASCollectionView or ASTableView to force it to load contents initially at the bottom, which is not required to make this work but it certainly goes hand-in-hand. I don't really love the way I made that work in my app so I haven't tried to create that functionality just yet. If I get time to (or someone else wants to), I could see where tying this directly to some property on ASCollectionView and ASTableView that dictates if it's a bottom-loaded scrollView could get rid of the extra property `atTail`.\r\n\r\nThis also fixes a couple incorrectly-written tests, -testHorizontalScrollToLessThanLeading and -testHorizontalScrollingPastContentSize.","created_at":"2016-01-28T20:26:12Z","updated_at":"2016-01-28T20:26:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141/commits","review_comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141/comments","review_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1141/comments","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/65db6fbfdfd114f6882f9d2ae7ad46dc47b2f480","head":{"label":"tomizimobile:trailingBatchFetch","ref":"trailingBatchFetch","sha":"65db6fbfdfd114f6882f9d2ae7ad46dc47b2f480","user":{"login":"tomizimobile","id":7967500,"avatar_url":"https://avatars.githubusercontent.com/u/7967500?v=3","gravatar_id":"","url":"https://api.github.com/users/tomizimobile","html_url":"https://github.com/tomizimobile","followers_url":"https://api.github.com/users/tomizimobile/followers","following_url":"https://api.github.com/users/tomizimobile/following{/other_user}","gists_url":"https://api.github.com/users/tomizimobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tomizimobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomizimobile/subscriptions","organizations_url":"https://api.github.com/users/tomizimobile/orgs","repos_url":"https://api.github.com/users/tomizimobile/repos","events_url":"https://api.github.com/users/tomizimobile/events{/privacy}","received_events_url":"https://api.github.com/users/tomizimobile/received_events","type":"User","site_admin":false},"repo":{"id":50603006,"name":"AsyncDisplayKit","full_name":"tomizimobile/AsyncDisplayKit","owner":{"login":"tomizimobile","id":7967500,"avatar_url":"https://avatars.githubusercontent.com/u/7967500?v=3","gravatar_id":"","url":"https://api.github.com/users/tomizimobile","html_url":"https://github.com/tomizimobile","followers_url":"https://api.github.com/users/tomizimobile/followers","following_url":"https://api.github.com/users/tomizimobile/following{/other_user}","gists_url":"https://api.github.com/users/tomizimobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tomizimobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomizimobile/subscriptions","organizations_url":"https://api.github.com/users/tomizimobile/orgs","repos_url":"https://api.github.com/users/tomizimobile/repos","events_url":"https://api.github.com/users/tomizimobile/events{/privacy}","received_events_url":"https://api.github.com/users/tomizimobile/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomizimobile/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":true,"url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit","forks_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/tomizimobile/AsyncDisplayKit/deployments","created_at":"2016-01-28T18:14:31Z","updated_at":"2016-01-28T18:14:33Z","pushed_at":"2016-01-28T19:51:28Z","git_url":"git://github.com/tomizimobile/AsyncDisplayKit.git","ssh_url":"git@github.com:tomizimobile/AsyncDisplayKit.git","clone_url":"https://github.com/tomizimobile/AsyncDisplayKit.git","svn_url":"https://github.com/tomizimobile/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":15703,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"e22c50101ab10d0a9ea93a2b141f6753cdcb7af5","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":21265042,"name":"AsyncDisplayKit","full_name":"facebook/AsyncDisplayKit","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":false,"url":"https://api.github.com/repos/facebook/AsyncDisplayKit","forks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/deployments","created_at":"2014-06-27T05:29:02Z","updated_at":"2016-01-28T16:51:52Z","pushed_at":"2016-01-28T20:26:13Z","git_url":"git://github.com/facebook/AsyncDisplayKit.git","ssh_url":"git@github.com:facebook/AsyncDisplayKit.git","clone_url":"https://github.com/facebook/AsyncDisplayKit.git","svn_url":"https://github.com/facebook/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":16952,"stargazers_count":7181,"watchers_count":7181,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1096,"mirror_url":null,"open_issues_count":166,"forks":1096,"open_issues":166,"watchers":7181,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/1141"},"issue":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1141"},"comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1141/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1141/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/65db6fbfdfd114f6882f9d2ae7ad46dc47b2f480"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":172,"deletions":59,"changed_files":7}}