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

Avoid collision when add_new_at is nil #411

Merged
merged 2 commits into from
Jan 31, 2023
Merged

Avoid collision when add_new_at is nil #411

merged 2 commits into from
Jan 31, 2023

Conversation

brendon
Copy link
Owner

@brendon brendon commented Jan 31, 2023

Rename add_to_list_top and add_to_list_bottom private methods to avoid_collision that handles both cases as well as the case where :add_new_at is nil. Setting an explicit position when :add_new_at is nil will now shuffle other items out of the way if necessary.

Fixes #410

Rename `add_to_list_top` and `add_to_list_bottom` private methods to `avoid_collision` that handles both cases as well as the case where `:add_new_at` is `nil`. Setting an explicit position when `:add_new_at` is `nil` will now shuffle other items out of the way if necessary.
@brendon brendon merged commit 9180a74 into master Jan 31, 2023
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.

Bug: Possibly duplicated positions if not given add_new_at: top option
1 participant