Skip to content
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

Relaxes generic constraints in Presenters #35

Merged
merged 4 commits into from
Feb 3, 2016

Conversation

diegosanchezr
Copy link
Contributor

Presenters shouldn't have any restriction about what models they receive. Their responsability is to present a CollectionViewCell and they only need a ViewModel for that. Therefore, it's responsability of the ViewModelBuilder to be able to provide a ViewModel for a especific model and it's there where the type constraint should reside.

For instance, this allows reusing a PhotoMessagePresenter without having a model conforming to PhotoMessageModelProtocol.

@diegosanchezr diegosanchezr changed the title Relaxes generic contraints in Presenters Relaxes generic constraints in Presenters Feb 3, 2016
@codecov-io
Copy link

Current coverage is 61.29%

Merging #35 into dev will increase coverage by +0.05% as of 0aa9972

@@              dev     #35   diff @@
=====================================
  Files          55      55       
  Stmts        2851    2855     +4
  Branches        0       0       
  Methods         0       0       
=====================================
+ Hit          1746    1750     +4
  Partial         0       0       
  Missed       1105    1105       

Review entire Coverage Diff as of 0aa9972

Powered by Codecov. Updated on successful CI builds.

diegosanchezr added a commit that referenced this pull request Feb 3, 2016
Relaxes generic constraints in Presenters
@diegosanchezr diegosanchezr merged commit 91ce422 into badoo:dev Feb 3, 2016
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