This reverts commit 2e98588372 (#751).
The reason we can't wait for the coming CA's layout pass is that cell node visibility events occur before the pass, at which time the cell's subnodes don't have correct frames for impression tracking.
The root cause of this problem is that, right now, cell node visible states are set by ASRangeController well before the layout pass of the hosting collection/table view. That means we're "jumping the gun". The more I think about this, the more I agree with @Adlai-Holler that we need to treat visible state differently. That is, a node should only be visible (and thus get visibility events) after it's fully loaded, it's view/layer attached to the hierarchy and laid out by a CA transaction. In other words, at the end of the CA layout pass. Such change needs time and effort to be thoroughly reviewed and tested. Until then, let's roll with this fix.
* Fixed breaking issue where completeBatchFetching is called on a background thread when no items are added to the collection
* Changed spaces to tabs for consistency
* Moved return statement for Code Review feedback
* Fixed the same issue in the Objective-C version of ASDKgram
* One more
* Update PhotoFeedModel.m
Fix header
* Fix capturing self in the block while loading image in ASNetworkImageNode
* Restore re-strongify while switching on the main thread
* Update CHANGELOG.md
* Add support for piping arbitrary user info from ASImageDownloader to the ASNetworkImageNodeDelegate
* s/source/sourceType
* Fix stuff and take Michael's advice
* Faster collection operations
* Fix a few things
* Put the stupid semicolon
* Address warning
* Cut down retain/releases during collection operations
* Update CHANGELOG.md
Many files were referencing macros defined by TargetConditionals before
including it.
Also updates one macro from the deprecated TARGET_IPHONE_SIMULATOR to
TARGET_OS_SIMULATOR.