Skip to content

Commit

Permalink
Notifying about the deletion of the chip by a listener event even whe…
Browse files Browse the repository at this point in the history
…n the deletion was done manually.
  • Loading branch information
milos192 committed Dec 1, 2016
1 parent 2b71d20 commit c9b5909
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/src/main/java/com/seraphim/chips/ChipsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ public List<Chip> getChips() {
public boolean removeChipBy(ChipEntry entry) {
for (int i = 0; i < chipList.size(); i++) {
if (chipList.get(i).mEntry != null && chipList.get(i).mEntry.equals(entry)) {
chipList.remove(i);
Chip chip = chipList.remove(i);
if (chipsListener != null) {
chipsListener.onChipDeleted(chip);
}
onChipsChanged(true);
return true;
}
Expand Down

0 comments on commit c9b5909

Please sign in to comment.