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

Allows the decorator to override item ids #143

Merged
merged 1 commit into from
Jun 1, 2016

Conversation

diegosanchezr
Copy link
Contributor

Consider:

  1. You have a ChatMessage model object wich conforms to ChatItem (it's got a uid property)
  2. You send a new message. The uid is some client-side generated id.
  3. Message is sent. The uid of the message changes to server-side id

AR: The existing cell will be removed from the collection view and a new one will be inserted.

With this change the ChatItemsDecorator has the opportunity to override the uid used by the changes generator engine. For instance, it could return the client id so the same cell is reused

@codecov-io
Copy link

codecov-io commented Jun 1, 2016

Current coverage is 64.87%

Merging #143 into dev will increase coverage by <.01%

@@                dev       #143   diff @@
==========================================
  Files            60         60          
  Lines          3196       3197     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2073       2074     +1   
  Misses         1123       1123          
  Partials          0          0          

Powered by Codecov. Last updated by 6e55f5e...b0f3493

@diegosanchezr diegosanchezr merged commit 592c8ee into dev Jun 1, 2016
@diegosanchezr diegosanchezr deleted the allow-decorator-to-override-item-ids branch June 1, 2016 11:35
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