splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 384 forks source link

onTokenRemoved method called twice when calling clear method #357

Closed maheshwariaanchal closed 6 years ago

maheshwariaanchal commented 6 years ago

Whenever I call clear method on ContactsCompletionView (ContactsCompletionView.clear()), onTokenRemoved is called twice for removing single token. So if I have selected 6 tokens and I call clear method on ContactsCompletionView, onTokenRemoved is called 12 times. (Twice for a single token). Please help

mgod commented 6 years ago

It looks like this is a limitation of the current library. I'm working on an update that should change the underlying implementation enough to fix this issue, but I'm not sure when it will be available. In general, we recommend using removeObject on the objects you want to remove rather than clear.