Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Fix for insertion new item before the last item#109

Merged
usirin merged 2 commits intokoding:masterfrom
alex-ionochkin:insertion-into-list-at-index-fix
Jan 26, 2015
Merged

Fix for insertion new item before the last item#109
usirin merged 2 commits intokoding:masterfrom
alex-ionochkin:insertion-into-list-at-index-fix

Conversation

@alex-ionochkin
Copy link
Copy Markdown
Contributor

@sinan, can you review this fix? It's for a case when new item should be inserted before the last item in the list. Currently new item is added to the end of the list in this case

Comment thread src/components/list/listview.coffee Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move cache the result of length - 1 and use that if possible, I know it was already like that but changing it to a local variable would be better for DRY.

@usirin
Copy link
Copy Markdown
Contributor

usirin commented Jan 23, 2015

Other than that minor stuff, it LGTM. Thanks for that @alex-ionochkin 👍

@alex-ionochkin
Copy link
Copy Markdown
Contributor Author

@usirin, thanks for review. I cached length - 1 as you suggested. Please take a look

usirin added a commit that referenced this pull request Jan 26, 2015
…dex-fix

Fix for insertion new item before the last item
@usirin usirin merged commit 4003302 into koding:master Jan 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants