{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/comments/174952952","pull_request_review_id":104404417,"id":174952952,"diff_hunk":"@@ -90,6 +92,26 @@ class HomeFragment : Fragment() {\n         }\n \n         registerForContextMenu(view)\n+\n+        tileContainer.addOnScrollListener(object : RecyclerView.OnScrollListener() {\n+            override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {\n+                // Only add scroll offset when user is scrolling down\n+                if (dy > 0) {\n+                    val layoutManager = recyclerView?.layoutManager as GridLayoutManager\n+                    val visibleItemCount = layoutManager.childCount\n+                    val totalItemCount = layoutManager.itemCount\n+                    val pastVisibleItems = layoutManager.findFirstVisibleItemPosition()\n+                    // This checks to see if we have reached the last row of the RecyclerView after a scroll occurs.\n+                    // If we have not reached that point, we additionally scroll with a small offset\n+                    // to reveal the next row, thus preventing the refocusing of the URL bar.\n+                    if (pastVisibleItems + visibleItemCount < totalItemCount) {","path":"app/src/main/java/org/mozilla/focus/home/HomeFragment.kt","position":32,"original_position":32,"commit_id":"e28be90d37cd5cbcc9e04af7d77e92dbbe4de66b","original_commit_id":"e28be90d37cd5cbcc9e04af7d77e92dbbe4de66b","user":{"login":"liuche","id":1082253,"avatar_url":"https://avatars0.githubusercontent.com/u/1082253?v=4","gravatar_id":"","url":"https://api.github.com/users/liuche","html_url":"https://github.com/liuche","followers_url":"https://api.github.com/users/liuche/followers","following_url":"https://api.github.com/users/liuche/following{/other_user}","gists_url":"https://api.github.com/users/liuche/gists{/gist_id}","starred_url":"https://api.github.com/users/liuche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuche/subscriptions","organizations_url":"https://api.github.com/users/liuche/orgs","repos_url":"https://api.github.com/users/liuche/repos","events_url":"https://api.github.com/users/liuche/events{/privacy}","received_events_url":"https://api.github.com/users/liuche/received_events","type":"User","site_admin":false},"body":"If we have more than three rows (say 4), won't this scroll extra when you move down to the second row, even if you haven't reached the \"bottom\" of the visible items? because\r\n`pastVisibleItems` = 0\r\n`visibleItemCount` = 3 x 5 = 15\r\n`totalItemCount` = 4 x 5 = 20 > 15","created_at":"2018-03-15T22:34:36Z","updated_at":"2018-03-15T22:39:44Z","html_url":"https://github.com/mozilla-mobile/firefox-tv/pull/680#discussion_r174952952","pull_request_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/comments/174952952"},"html":{"href":"https://github.com/mozilla-mobile/firefox-tv/pull/680#discussion_r174952952"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680","id":175107535,"html_url":"https://github.com/mozilla-mobile/firefox-tv/pull/680","diff_url":"https://github.com/mozilla-mobile/firefox-tv/pull/680.diff","patch_url":"https://github.com/mozilla-mobile/firefox-tv/pull/680.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/680","number":680,"state":"open","locked":false,"title":"Closes #634: With > 1 page of home tiles, sometimes cursor disappears…","user":{"login":"bkmunar","id":8356717,"avatar_url":"https://avatars2.githubusercontent.com/u/8356717?v=4","gravatar_id":"","url":"https://api.github.com/users/bkmunar","html_url":"https://github.com/bkmunar","followers_url":"https://api.github.com/users/bkmunar/followers","following_url":"https://api.github.com/users/bkmunar/following{/other_user}","gists_url":"https://api.github.com/users/bkmunar/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmunar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmunar/subscriptions","organizations_url":"https://api.github.com/users/bkmunar/orgs","repos_url":"https://api.github.com/users/bkmunar/repos","events_url":"https://api.github.com/users/bkmunar/events{/privacy}","received_events_url":"https://api.github.com/users/bkmunar/received_events","type":"User","site_admin":false},"body":"… when scrolling down","created_at":"2018-03-14T22:57:44Z","updated_at":"2018-03-15T22:39:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b2c8645d6056e67d9f263e006dc35ac85ca9d6e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/680/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/statuses/e28be90d37cd5cbcc9e04af7d77e92dbbe4de66b","head":{"label":"mozilla-mobile:bkmunar/homeScreenScroll","ref":"bkmunar/homeScreenScroll","sha":"e28be90d37cd5cbcc9e04af7d77e92dbbe4de66b","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":114038082,"name":"firefox-tv","full_name":"mozilla-mobile/firefox-tv","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/firefox-tv","description":"Firefox for Amazon's Fire TV","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/firefox-tv","forks_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/deployments","created_at":"2017-12-12T20:53:46Z","updated_at":"2018-03-15T21:52:49Z","pushed_at":"2018-03-15T22:10:42Z","git_url":"git://github.com/mozilla-mobile/firefox-tv.git","ssh_url":"git@github.com:mozilla-mobile/firefox-tv.git","clone_url":"https://github.com/mozilla-mobile/firefox-tv.git","svn_url":"https://github.com/mozilla-mobile/firefox-tv","homepage":"https://blog.mozilla.org/blog/2017/12/20/firefox-is-now-on-amazon-fire-tv-happy-holiday-watching/","size":96170,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":13,"open_issues":138,"watchers":15,"default_branch":"master"}},"base":{"label":"mozilla-mobile:master","ref":"master","sha":"df897349ccb6a676d2a768d3d6c0d759308435e5","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":114038082,"name":"firefox-tv","full_name":"mozilla-mobile/firefox-tv","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/firefox-tv","description":"Firefox for Amazon's Fire TV","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/firefox-tv","forks_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/firefox-tv/deployments","created_at":"2017-12-12T20:53:46Z","updated_at":"2018-03-15T21:52:49Z","pushed_at":"2018-03-15T22:10:42Z","git_url":"git://github.com/mozilla-mobile/firefox-tv.git","ssh_url":"git@github.com:mozilla-mobile/firefox-tv.git","clone_url":"https://github.com/mozilla-mobile/firefox-tv.git","svn_url":"https://github.com/mozilla-mobile/firefox-tv","homepage":"https://blog.mozilla.org/blog/2017/12/20/firefox-is-now-on-amazon-fire-tv-happy-holiday-watching/","size":96170,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":13,"open_issues":138,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680"},"html":{"href":"https://github.com/mozilla-mobile/firefox-tv/pull/680"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/680"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/issues/680/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/pulls/680/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-tv/statuses/e28be90d37cd5cbcc9e04af7d77e92dbbe4de66b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"liuche"}}