{"action":"created","issue":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/69","labels_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/69/comments","events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/69/events","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/69","id":101504114,"number":69,"title":"Fix image flickering issue caused by unnecessary dispatch & add cross-dissolve","user":{"login":"bgerstle","id":444217,"avatar_url":"https://avatars.githubusercontent.com/u/444217?v=3","gravatar_id":"","url":"https://api.github.com/users/bgerstle","html_url":"https://github.com/bgerstle","followers_url":"https://api.github.com/users/bgerstle/followers","following_url":"https://api.github.com/users/bgerstle/following{/other_user}","gists_url":"https://api.github.com/users/bgerstle/gists{/gist_id}","starred_url":"https://api.github.com/users/bgerstle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgerstle/subscriptions","organizations_url":"https://api.github.com/users/bgerstle/orgs","repos_url":"https://api.github.com/users/bgerstle/repos","events_url":"https://api.github.com/users/bgerstle/events{/privacy}","received_events_url":"https://api.github.com/users/bgerstle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-17T20:31:23Z","updated_at":"2015-08-17T20:46:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/69","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/69","diff_url":"https://github.com/wikimedia/wikipedia-ios/pull/69.diff","patch_url":"https://github.com/wikimedia/wikipedia-ios/pull/69.patch"},"body":"Bug: [T108053](https://phabricator.wikimedia.org/T108053)\r\n\r\nFirst, I tried only animating the transition when the image wasn't retrieved from memory.  Still occasionally saw \"flicker\" when scrolling quickly over images that should've been in memory.  As a result, I ended up exposing `WMFImageController.cachedImageInMemoryWithURL(NSURL)` to get images from memory.  This allows the image to be set before returning from `collectionView:cellForItemAtIndexPath:`, preventing the cell from appearing image-less when the image is already in memory.\r\n\r\nCheck out [this sweet demo](https://s3.amazonaws.com/f.cl.ly/items/1g070k2w0l131g1M162b/Screen%20Recording%202015-08-17%20at%2004.22%20PM.gif).  Caveat: this actually demonstrates that the \"wrong image\" bug is still present. Fix for that to follow shortly. _Hint: it's because canceling image fetches doesn't also cancel face detection it has already started_.\r\n\r\n### Follow-up work\r\n- Fixing aforementioned bug where the wrong image still temporarily displays\r\n- Refactoring the following logic into an easier-to-reuse component:\r\n  1. Decide if an image can be set synchronously from memory, then set it (e.g. set an image if face detection has run)\r\n  2. Otherwise, fetch the image, potentially do some work with that image (e.g. face detection), then set it"},"comment":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/comments/131956949","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/69#issuecomment-131956949","issue_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/69","id":131956949,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T20:46:55Z","updated_at":"2015-08-17T20:46:55Z","body":"## [Current coverage][1] is `18.97%`\n> Merging **#69** into **master** will increase coverage by **+0.33%** as of [`3bd692c`][3]\n\n\n\n[1]: https://codecov.io/github/wikimedia/wikipedia-ios?ref=3bd692cde3240559837b9da7c2d6c34af8cd2d43\n[2]: https://codecov.io/github/wikimedia/wikipedia-ios/features/suggestions?ref=3bd692cde3240559837b9da7c2d6c34af8cd2d43\n[3]: https://codecov.io/github/wikimedia/wikipedia-ios/commit/3bd692cde3240559837b9da7c2d6c34af8cd2d43\n[4]: https://codecov.io/github/wikimedia/wikipedia-ios/compare/636863d1dee245981fa632b2d69d7cf21c515007...3bd692cde3240559837b9da7c2d6c34af8cd2d43\n\n> Powered by [Codecov](https://codecov.io). Updated on successful CI builds."}}