Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASCellNode] didExitVisibleState is not called when a visible cell is deleted #2658

@flovouin

Description

@flovouin

Hi guys,

I've had an issue for some time now. I recently upgraded to master, but the problem is still here: didExistVisibleState (and the previous visibility method for < 2.0) is not called on a visible ASCellNode when it is deleted using the ASCollectionNode (and previously ASCollectionView) method deleteItemsAtIndexPaths.
When scrolling, the visibility methods are called correctly. When presenting / pushing another controller, the behaviour is also correct. It only happens when deleting visible cells. Please note that no other data management method is called either (e.g. clearFetchedData). As the cell nodes in my application are pretty heavy, I would very much like to be notified when they are permanently deleted.

I made a simple test project that demonstrates the issue: https://github.com/flovouin/ASDK-CellVisibleState
Running the code should output in the console:

Adding lots of cells
Removing cells
Showing another controller
Goodbye from cell at index 0!
Goodbye from a cell that was no longer in the collection!
Goodbye from a cell that was no longer in the collection!
Goodbye from a cell that was no longer in the collection!
Goodbye from a cell that was no longer in the collection!
Goodbye from a cell that was no longer in the collection!
Goodbye from a cell that was no longer in the collection!

The visibility method for the removed cells is only called once the whole collection disappears. I would expect the following output:

Adding lots of cells
Removing cells
Goodbye from cell at index 0!
Goodbye from cell at index 1!
Goodbye from cell at index 2!
Goodbye from cell at index 3!
Goodbye from cell at index 4!
Goodbye from cell at index 5!
Showing another controller
Goodbye from cell at index 0!

If you need anything else, don't hesitate to ask.

Cheers,

Flo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions