{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react-native/pulls/comments/231406541","pull_request_review_id":172369123,"id":231406541,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTQwNjU0MQ==","diff_hunk":"@@ -302,6 +302,16 @@ public void getClippingRect(Rect outClippingRect) {\n \n   @Override\n   public void fling(int velocityY) {\n+    // Workaround.\n+    // On Android P if a ScrollView is inverted, we will get a wrong sign for\n+    // velocityY (see https://issuetracker.google.com/issues/112385925). \n+    // At the same time, mOnScrollDispatchHelper tracks the correct velocity direction. \n+    //\n+    // Hence, we can use the absolute value from whatever the OS gives\n+    // us and use the sign of what mOnScrollDispatchHelper has tracked.\n+    velocityY = (int)(Math.abs(velocityY) * Math.signum(mOnScrollDispatchHelper.getYFlingVelocity()));","path":"ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java","position":11,"original_position":11,"commit_id":"107a9ecee5fe70bbed8456b8a1c7b6fa33e13b5c","original_commit_id":"107a9ecee5fe70bbed8456b8a1c7b6fa33e13b5c","user":{"login":"mandrigin","id":466427,"node_id":"MDQ6VXNlcjQ2NjQyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/466427?v=4","gravatar_id":"","url":"https://api.github.com/users/mandrigin","html_url":"https://github.com/mandrigin","followers_url":"https://api.github.com/users/mandrigin/followers","following_url":"https://api.github.com/users/mandrigin/following{/other_user}","gists_url":"https://api.github.com/users/mandrigin/gists{/gist_id}","starred_url":"https://api.github.com/users/mandrigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandrigin/subscriptions","organizations_url":"https://api.github.com/users/mandrigin/orgs","repos_url":"https://api.github.com/users/mandrigin/repos","events_url":"https://api.github.com/users/mandrigin/events{/privacy}","received_events_url":"https://api.github.com/users/mandrigin/received_events","type":"User","site_admin":false},"body":"Thanks for reviewing!\r\nI’m away from my laptop this week, will address you comment on Monday.","created_at":"2018-11-07T07:50:27Z","updated_at":"2018-11-07T07:50:27Z","html_url":"https://github.com/facebook/react-native/pull/21117#discussion_r231406541","pull_request_url":"https://api.github.com/repos/facebook/react-native/pulls/21117","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments/231406541"},"html":{"href":"https://github.com/facebook/react-native/pull/21117#discussion_r231406541"},"pull_request":{"href":"https://api.github.com/repos/facebook/react-native/pulls/21117"}},"in_reply_to_id":231362507},"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/21117","id":215557936,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NTU3OTM2","html_url":"https://github.com/facebook/react-native/pull/21117","diff_url":"https://github.com/facebook/react-native/pull/21117.diff","patch_url":"https://github.com/facebook/react-native/pull/21117.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/21117","number":21117,"state":"open","locked":false,"title":"[Android] [Lists] Workaround a wrong fling direction for inverted ScrollViews on Android P","user":{"login":"mandrigin","id":466427,"node_id":"MDQ6VXNlcjQ2NjQyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/466427?v=4","gravatar_id":"","url":"https://api.github.com/users/mandrigin","html_url":"https://github.com/mandrigin","followers_url":"https://api.github.com/users/mandrigin/followers","following_url":"https://api.github.com/users/mandrigin/following{/other_user}","gists_url":"https://api.github.com/users/mandrigin/gists{/gist_id}","starred_url":"https://api.github.com/users/mandrigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandrigin/subscriptions","organizations_url":"https://api.github.com/users/mandrigin/orgs","repos_url":"https://api.github.com/users/mandrigin/repos","events_url":"https://api.github.com/users/mandrigin/events{/privacy}","received_events_url":"https://api.github.com/users/mandrigin/received_events","type":"User","site_admin":false},"body":"This is a safe workaround to an issue in Android P: https://issuetracker.google.com/issues/112385925\r\n\r\nIt is based on a fact that even though `fling` receive a wrong sign in `velocityY`, `mOnScrollDispatchHelper.getYFlingVelocity()` still returns a fling direction.\r\n\r\nFixes #19434 \r\n\r\nTest Plan:\r\n----------\r\n1) Create a test application with a FlatList with `inverted={true}`.\r\n2) Fill it with data\r\n3) Scroll and release your finger\r\n\r\nExpected:\r\nOn Android 8 and 9 the behaviour is the same.\r\n\r\nRelease Notes:\r\n--------------\r\n[ANDROID] [BUGFIX] [ScrollView] - Workaround a wrong fling direction for inverted ScrollViews on Android P\r\n<!--\r\n  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**\r\n\r\n    CATEGORY\r\n  [----------]      TYPE\r\n  [ CLI      ] [-------------]    LOCATION\r\n  [ DOCS     ] [ BREAKING    ] [-------------]\r\n  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]\r\n  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]\r\n  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|\r\n  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |\r\n  [----------] [-------------] [-------------]   |-----------|\r\n\r\n EXAMPLES:\r\n\r\n [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things\r\n [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput\r\n [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with\r\n [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word\r\n [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position\r\n [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see\r\n-->","created_at":"2018-09-14T10:59:56Z","updated_at":"2018-11-07T07:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a43cb76a782ea4f8d20288447ecf7ed9519f0a15","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":196858975,"node_id":"MDU6TGFiZWwxOTY4NTg5NzU=","url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"ffffff","default":false},{"id":869759799,"node_id":"MDU6TGFiZWw4Njk3NTk3OTk=","url":"https://api.github.com/repos/facebook/react-native/labels/%E2%9C%85Release%20Notes","name":"✅Release Notes","color":"0e8a16","default":false},{"id":934239421,"node_id":"MDU6TGFiZWw5MzQyMzk0MjE=","url":"https://api.github.com/repos/facebook/react-native/labels/%E2%9C%85Test%20Plan","name":"✅Test Plan","color":"0e8a16","default":false},{"id":870851515,"node_id":"MDU6TGFiZWw4NzA4NTE1MTU=","url":"https://api.github.com/repos/facebook/react-native/labels/%F0%9F%94%B7Android","name":"🔷Android","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/21117/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/21117/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/21117/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/107a9ecee5fe70bbed8456b8a1c7b6fa33e13b5c","head":{"label":"mandrigin:workaround/fling-on-android-P","ref":"workaround/fling-on-android-P","sha":"107a9ecee5fe70bbed8456b8a1c7b6fa33e13b5c","user":{"login":"mandrigin","id":466427,"node_id":"MDQ6VXNlcjQ2NjQyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/466427?v=4","gravatar_id":"","url":"https://api.github.com/users/mandrigin","html_url":"https://github.com/mandrigin","followers_url":"https://api.github.com/users/mandrigin/followers","following_url":"https://api.github.com/users/mandrigin/following{/other_user}","gists_url":"https://api.github.com/users/mandrigin/gists{/gist_id}","starred_url":"https://api.github.com/users/mandrigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandrigin/subscriptions","organizations_url":"https://api.github.com/users/mandrigin/orgs","repos_url":"https://api.github.com/users/mandrigin/repos","events_url":"https://api.github.com/users/mandrigin/events{/privacy}","received_events_url":"https://api.github.com/users/mandrigin/received_events","type":"User","site_admin":false},"repo":{"id":137915585,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc5MTU1ODU=","name":"react-native","full_name":"mandrigin/react-native","private":false,"owner":{"login":"mandrigin","id":466427,"node_id":"MDQ6VXNlcjQ2NjQyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/466427?v=4","gravatar_id":"","url":"https://api.github.com/users/mandrigin","html_url":"https://github.com/mandrigin","followers_url":"https://api.github.com/users/mandrigin/followers","following_url":"https://api.github.com/users/mandrigin/following{/other_user}","gists_url":"https://api.github.com/users/mandrigin/gists{/gist_id}","starred_url":"https://api.github.com/users/mandrigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandrigin/subscriptions","organizations_url":"https://api.github.com/users/mandrigin/orgs","repos_url":"https://api.github.com/users/mandrigin/repos","events_url":"https://api.github.com/users/mandrigin/events{/privacy}","received_events_url":"https://api.github.com/users/mandrigin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mandrigin/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/mandrigin/react-native","forks_url":"https://api.github.com/repos/mandrigin/react-native/forks","keys_url":"https://api.github.com/repos/mandrigin/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mandrigin/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mandrigin/react-native/teams","hooks_url":"https://api.github.com/repos/mandrigin/react-native/hooks","issue_events_url":"https://api.github.com/repos/mandrigin/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/mandrigin/react-native/events","assignees_url":"https://api.github.com/repos/mandrigin/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/mandrigin/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/mandrigin/react-native/tags","blobs_url":"https://api.github.com/repos/mandrigin/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mandrigin/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mandrigin/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/mandrigin/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mandrigin/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/mandrigin/react-native/languages","stargazers_url":"https://api.github.com/repos/mandrigin/react-native/stargazers","contributors_url":"https://api.github.com/repos/mandrigin/react-native/contributors","subscribers_url":"https://api.github.com/repos/mandrigin/react-native/subscribers","subscription_url":"https://api.github.com/repos/mandrigin/react-native/subscription","commits_url":"https://api.github.com/repos/mandrigin/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/mandrigin/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/mandrigin/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/mandrigin/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/mandrigin/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/mandrigin/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mandrigin/react-native/merges","archive_url":"https://api.github.com/repos/mandrigin/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mandrigin/react-native/downloads","issues_url":"https://api.github.com/repos/mandrigin/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/mandrigin/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/mandrigin/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/mandrigin/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mandrigin/react-native/labels{/name}","releases_url":"https://api.github.com/repos/mandrigin/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/mandrigin/react-native/deployments","created_at":"2018-06-19T16:10:17Z","updated_at":"2018-07-25T07:08:47Z","pushed_at":"2018-09-14T13:25:44Z","git_url":"git://github.com/mandrigin/react-native.git","ssh_url":"git@github.com:mandrigin/react-native.git","clone_url":"https://github.com/mandrigin/react-native.git","svn_url":"https://github.com/mandrigin/react-native","homepage":"https://facebook.github.io/react-native/","size":230610,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"a3752c6c6305219d5d60e210b036e8ac6b5afc2b","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","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":29028775,"node_id":"MDEwOlJlcG9zaXRvcnkyOTAyODc3NQ==","name":"react-native","full_name":"facebook/react-native","private":false,"owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","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},"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2018-11-07T07:42:26Z","pushed_at":"2018-11-07T06:07:41Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"https://facebook.github.io/react-native/","size":277431,"stargazers_count":70677,"watchers_count":70677,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15839,"mirror_url":null,"archived":false,"open_issues_count":958,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15839,"open_issues":958,"watchers":70677,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/21117"},"html":{"href":"https://github.com/facebook/react-native/pull/21117"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/21117"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/21117/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/21117/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/21117/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/107a9ecee5fe70bbed8456b8a1c7b6fa33e13b5c"}},"author_association":"NONE"}}
{"actor":{"display_login":"mandrigin"}}