-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All providers update after changed datasource in one provider #89
Comments
It is the current behaviour. |
@lkzhao is there any solution now?
They have different dataSources:
but when I'm in the second cell and my info dataSource is updated (which updated every n seconds), my video stops, because second cell is updating too.. |
In my case, where I have only 1 cell in each provider I can update cell in cellUpdater if there is no link before:
|
Yes, this is the suggested solution to this problem. What I usually do is something like this: class MyCell: UIView {
var url: URL?
func configure(with url: URL) {
guard self.url != url else { return }
// do your magic
}
} |
Yeah, i’ve already changed my code to like yours. |
Hello!
Let's imagine we have ComposedProvider:
collectionView.provider = ComposedProvider(sections: [firstProvider, secondProvider])
The issue is when we've updated dataSource in firstProvider, like:
firstProviderDataSource.data = [newData]
viewUpdater and sizeSource are called for secondProvider too.
So everytime when we update data in some dataSource, all other providers will recalculate their sizeSource..
Is it right behavior?
Thanks!
The text was updated successfully, but these errors were encountered: