Garrett Moon
f94229796c
Fixes out of order blocks running on main queue in ASDataController
...
ASDataController’s completedNodes is accessed by treating the main thread as a serial queue. The *problem* is, operations can cut in line by being added while on the main thread. I.e. it just calls the block instead of dispatch_async’ing to the main thread. This results in data inconsistency.
To address this, I've added a queue of operations which get run serially (not to be confused with a serial dispatch queue). Instead of running blocks directly on the main thread, if it’s called while not on the main thread, it dispatch_asyncs to the main thread and runs any blocks in the queue. If it *is* on the main thread, it runs any blocks already in the queue and then runs the block.
2015-12-11 10:45:22 -08:00
Scott Goodson
88b36f58e7
Ensure an empty array is returned if visibleNodes is called before any nodes are complete.
2015-12-06 21:45:46 -08:00
Huy Nguyen
cd31f884dd
Move ASDisplayNodePerformBlockOnMainThread to ASInternalHelpers
2015-10-29 16:09:36 +02:00
appleguy
8dddcaa74b
Merge pull request #766 from levi/levi/synchronous-reloaddata
...
Add synchronous reloadData methods to ASTableView and ASCollectionView
2015-10-25 21:05:52 -07:00
Levi McCallum
722b90f1cf
Implement basic immediate reloadData method on table and collection view
2015-10-22 21:28:44 -07:00
Levi McCallum
c33d6efa8a
WIP synchronous reload data on collection view
2015-10-22 21:28:30 -07:00
Levi McCallum
45ff74b604
Remove array fallback on editing node index paths
2015-10-21 23:17:38 -07:00
Levi McCallum
9697edac33
Fix conditional block style
2015-10-21 23:17:37 -07:00
Levi McCallum
11076b115e
Used cached layout value in node remeasurement
2015-10-21 23:17:37 -07:00
Levi McCallum
55c1b8f6e7
Fix variable naming in debug log
2015-10-15 11:40:53 -07:00
Levi McCallum
ee0cc2001a
Add support for loaded node layout for supplementary views
2015-10-15 11:40:52 -07:00
Levi McCallum
952a66a924
Remove initial data loading subclass hook
2015-10-15 11:40:52 -07:00
Levi McCallum
1c717c74b8
Homogenize cell node measuring
2015-10-15 11:40:52 -07:00
Levi McCallum
fddb0061b0
Use ASCellNodes for supplementary nodes
2015-10-15 11:40:52 -07:00
Levi McCallum
848dc26a0d
Fix hook method naming
2015-10-15 11:40:52 -07:00
Levi McCallum
4fb4119f9c
Clarify data controller subclass hooks
2015-10-15 11:40:52 -07:00
Levi McCallum
eb5c79598c
Clean up arrangement of data controller subclassing methods
2015-10-15 11:40:52 -07:00
Levi McCallum
3f0092435a
Add support to move supplementary nodes with section position changes
2015-10-15 11:40:51 -07:00
Levi McCallum
9235ce5ac2
Support reloading supplementary nodes when sections reload
2015-10-15 11:40:51 -07:00
Levi McCallum
f9bba315df
Stub out subclass hooks for section insert/remove/update/moving
2015-10-15 11:40:51 -07:00
Levi McCallum
ed7a73361b
Use simpler completed nodes loop
2015-10-15 11:40:51 -07:00
Levi McCallum
71966f3549
Relayout all nodes in backing store on relayoutAllNodes
2015-10-15 11:40:51 -07:00
Levi McCallum
b58649fdcb
Clean up supplementary nodes in data controller store on each reload
2015-10-15 11:40:51 -07:00
Levi McCallum
769a67569c
Batch layout as display nodes
2015-10-15 11:40:50 -07:00
Levi McCallum
34f3065825
Use local method for introspecting data controller constrained sizes
2015-10-15 11:40:50 -07:00
Levi McCallum
0086949a65
Fix typo
2015-10-15 11:40:50 -07:00
Levi McCallum
1c2046cdf4
Localize debugging LOG definition
2015-10-15 11:40:50 -07:00
Levi McCallum
e4f274aebb
Expose completed nodes array by kind
2015-10-15 11:40:50 -07:00
Levi McCallum
aa1842e484
Remove non-null definitions
2015-10-15 11:40:50 -07:00
Levi McCallum
6e49e1f4d5
Initialize mutable editing nodes before section insertion
2015-10-15 11:40:50 -07:00
Levi McCallum
f041a273b5
Use rows mutable array for section deletion
2015-10-15 11:40:50 -07:00
Levi McCallum
afda471bd0
Clean up interfacing with internal editing/completed stores
2015-10-15 11:40:50 -07:00
Levi McCallum
835f9e99ca
Batch render supplementary views on reload data
2015-10-15 11:40:49 -07:00
Levi McCallum
a3dce24fdc
Document data controller node population
2015-10-15 11:40:49 -07:00
Levi McCallum
bdd786f593
Document internal storage behaviors of ASDataController
2015-10-15 11:40:49 -07:00
Levi McCallum
da7a2a5d48
Further implement data controller support and layout introspection
2015-10-15 11:40:49 -07:00
Levi McCallum
ed1b737ead
Define initial supplementary node creation behavior
2015-10-15 11:40:48 -07:00
Levi McCallum
e9eadac4ae
Stub out ASCollectionDataController subclass
2015-10-15 11:40:48 -07:00
Adlai Holler
fbd3c77fec
Finish that thought
2015-10-11 08:43:43 -07:00
Adlai Holler
d964364cd5
Add some documentation in DataController, plus use Fast Enumeration more
2015-10-11 08:39:29 -07:00
Adlai Holler
595891629c
Remove pointless assertion
2015-10-10 10:33:56 -07:00
Adlai Holler
0c361894ac
Remove comment
2015-10-09 21:17:11 -07:00
Adlai Holler
1e232561f4
Whitespace
2015-10-09 21:16:28 -07:00
Adlai Holler
7f42b37dec
Remove needsMeasure
2015-10-09 21:13:00 -07:00
Adlai Holler
fdb11275db
Put back the frame-setting behavior when measuring cell nodes
2015-10-09 20:23:54 -07:00
Adlai Holler
06b7897bc1
Finish measuring on main thread when possible
2015-10-09 20:06:59 -07:00
Adlai Holler
93cdc0f2f5
Don't set cell node frames during measurement
2015-10-09 19:55:14 -07:00
Adlai Holler
223e9ff504
Merge branch 'DontSetCellNodeFramesDuringMeasure' into MeasureCellNodesOnMain
...
Conflicts:
AsyncDisplayKit/Details/ASDataController.mm
2015-10-09 19:53:46 -07:00
Adlai Holler
e716ccb580
Don't set cell node frames during measure, set them just before returning the cell size to UITableView/UICollectionView
2015-10-09 19:51:12 -07:00
Adlai Holler
e92a6ce9e3
Initial work on measuring loaded cell nodes on the main thread
2015-10-09 19:37:36 -07:00