Skip to content

Multiselection bug solved#195

Merged
opticod merged 1 commit intoBuildmLearn:bug-fixesfrom
codingblazer:multiselect_bug
Nov 12, 2016
Merged

Multiselection bug solved#195
opticod merged 1 commit intoBuildmLearn:bug-fixesfrom
codingblazer:multiselect_bug

Conversation

@codingblazer
Copy link
Copy Markdown
Contributor

#142 #162 #163 #164

Hey @opticod , please review the PR.

Overview - The bug was because -Earlier, the code below was to update SelectedPosition because everytime element is deleted from arraylist, indices of elements changes. But this will fail if user make deletion operation more than once.

if(selectedPosition!=selectedPositions.get(0))
                selectedPosition--;

To solve this bug, I have sorted the arraylist in reverse order which solves the problem in efficient way and is standard way of handling such cases (Removing multiple elements from arraylist).
Also , in SaveApkFragment the deleted elements were not removed from the selectedPositions Map after the deletion operation.Thanks.

Copy link
Copy Markdown
Collaborator

@opticod opticod left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉 Merging !

@opticod opticod merged commit 7def88e into BuildmLearn:bug-fixes Nov 12, 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