Skip to content

Fixes way how ContentItemCell is checked of not being reused.#85

Open
valeriyvan wants to merge 1 commit intospotify:masterfrom
valeriyvan:refactor
Open

Fixes way how ContentItemCell is checked of not being reused.#85
valeriyvan wants to merge 1 commit intospotify:masterfrom
valeriyvan:refactor

Conversation

@valeriyvan
Copy link

Check of title for match as way to ensure cell wasn't reused is bad because there's no guaranty titles are unique.
UIKit gives method for such check.
If UICollectionView.cellForItem(at:) returns not nil - that is exactly cell which is needed. And returns nil if cell is not visible and there's no reason to update it.

Check of title for match as way to ensure cell wasn't reused is bad because there's no guaranty titles are unique.
UIKit gives method for such check.
If UICollectionView.cellForItem(at:) returns not nil - that is exactly cell which is needed. And returns nil if cell is not visible and there's no reason to update it.
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.

1 participant

Comments