{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1365","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1365/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1365/events","html_url":"https://github.com/facebook/react-native/issues/1365","id":79094678,"number":1365,"title":"UIBlocks don't flush at the correct time","user":{"login":"vishnevskiy","id":167844,"avatar_url":"https://avatars.githubusercontent.com/u/167844?v=3","gravatar_id":"","url":"https://api.github.com/users/vishnevskiy","html_url":"https://github.com/vishnevskiy","followers_url":"https://api.github.com/users/vishnevskiy/followers","following_url":"https://api.github.com/users/vishnevskiy/following{/other_user}","gists_url":"https://api.github.com/users/vishnevskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/vishnevskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishnevskiy/subscriptions","organizations_url":"https://api.github.com/users/vishnevskiy/orgs","repos_url":"https://api.github.com/users/vishnevskiy/repos","events_url":"https://api.github.com/users/vishnevskiy/events{/privacy}","received_events_url":"https://api.github.com/users/vishnevskiy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-21T17:38:42Z","updated_at":"2015-05-22T22:22:29Z","closed_at":null,"body":"I upgraded from a much lower version (I had a personal fork) to 0.4.4 and the POPAnimation native module I made is now having issues.\r\n\r\n```objc\r\nRCT_EXPORT_METHOD(addAnimation:(NSNumber *)tag animation:(NSNumber *)animation callback:(RCTResponseSenderBlock)callback) {\r\n  POPAnimation *anim = self.internalAnimations[animation];\r\n  [self.internalAnimations removeObjectForKey:animation];\r\n  anim.completionBlock = ^(POPAnimation *anim2, BOOL finished) {\r\n    callback(@[@(finished)]);\r\n  };\r\n\r\n  [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, RCTSparseArray *viewRegistry) {\r\n      RCTAssertMainThread();\r\n\r\n      UIView *view = viewRegistry[tag];\r\n      if (view) {\r\n        [view.layer pop_addAnimation:anim forKey:[animation stringValue]];\r\n      }\r\n  }];\r\n}\r\n```\r\n\r\nThis is all I am doing to add animations to a view, but now sometimes the UIBlock won't execute until the next user interaction after this function was called or even more oddly if I just leave the simulator running within a minute or so it executes.\r\n\r\n@vjeux told me to tag @tadeuzagallo on this :smile: \r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/104788442","html_url":"https://github.com/facebook/react-native/issues/1365#issuecomment-104788442","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1365","id":104788442,"user":{"login":"JohnyDays","id":4540763,"avatar_url":"https://avatars.githubusercontent.com/u/4540763?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnyDays","html_url":"https://github.com/JohnyDays","followers_url":"https://api.github.com/users/JohnyDays/followers","following_url":"https://api.github.com/users/JohnyDays/following{/other_user}","gists_url":"https://api.github.com/users/JohnyDays/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnyDays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnyDays/subscriptions","organizations_url":"https://api.github.com/users/JohnyDays/orgs","repos_url":"https://api.github.com/users/JohnyDays/repos","events_url":"https://api.github.com/users/JohnyDays/events{/privacy}","received_events_url":"https://api.github.com/users/JohnyDays/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T22:22:29Z","updated_at":"2015-05-22T22:22:29Z","body":"If I correctly understand your explanation, then perhaps my case was actually bug, since no calls to UIManager were actually being made in the native method. In fact I attempted to just call a native Alert (not through the react alert manager) and it still displayed the same behaviour, only appearing after a significant amount of time."}}