{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/7058","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/7058/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/7058/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/7058/events","html_url":"https://github.com/facebook/react-native/pull/7058","id":149367781,"number":7058,"title":"[Native-Animated] Support for stopping animations that run on UI thread.","user":{"login":"kmagiera","id":726445,"avatar_url":"https://avatars.githubusercontent.com/u/726445?v=3","gravatar_id":"","url":"https://api.github.com/users/kmagiera","html_url":"https://github.com/kmagiera","followers_url":"https://api.github.com/users/kmagiera/followers","following_url":"https://api.github.com/users/kmagiera/following{/other_user}","gists_url":"https://api.github.com/users/kmagiera/gists{/gist_id}","starred_url":"https://api.github.com/users/kmagiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmagiera/subscriptions","organizations_url":"https://api.github.com/users/kmagiera/orgs","repos_url":"https://api.github.com/users/kmagiera/repos","events_url":"https://api.github.com/users/kmagiera/events{/privacy}","received_events_url":"https://api.github.com/users/kmagiera/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-19T07:04:37Z","updated_at":"2016-04-19T12:21:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/7058","html_url":"https://github.com/facebook/react-native/pull/7058","diff_url":"https://github.com/facebook/react-native/pull/7058.diff","patch_url":"https://github.com/facebook/react-native/pull/7058.patch"},"body":"This change extends animated native module API with `stopAnimation` method that is responsible for interrupting actively running animation as a reslut of a JS call. In order for the `stopAnimation` to understand `animationId` argument I also had to add `animationId` to `startAnimation` method. As JS thread runs in parallel to the thread which executes the animation there is a chance that JS may call `stopAnimation` after the animation has finished. Because of that we are not doing any checks on the `animationId` parameter passed to `stopAnimation` in native and if the animation does not exists in the registry we ignore that call.\r\n\r\n**Test Plan**\r\nRun JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`\r\nRun java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/211896879","html_url":"https://github.com/facebook/react-native/pull/7058#issuecomment-211896879","issue_url":"https://api.github.com/repos/facebook/react-native/issues/7058","id":211896879,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T12:21:14Z","updated_at":"2016-04-19T12:21:14Z","body":"@kmagiera updated the pull request."}}