Skip to content

Conversation

@PortoCode
Copy link
Owner

When updating the table model and reloading the table, UIKit calls didEndDisplayingCell for each removed cell that was previously visible. Since we're canceling requests in this method, we could be sending messages to the new models or potentially crashing in case the new table model has fewer items than the previous one!

This is not a big problem at the moment since items cannot be removed from the feed. But we cannot assume the backend will keep this behavior going further.

…to prevent the cells from rendering automatically.
…ayingCell method - This method is invoked after calling `reloadData`, so we'd be cancelling requests in the wrong models or crash in case the model has less items than the previous model
@PortoCode PortoCode self-assigned this Mar 9, 2025
@PortoCode PortoCode merged commit 11eabff into main Mar 9, 2025
2 checks passed
@PortoCode PortoCode deleted the bugfix/did-end-displaying-cell branch March 9, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants