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

Probable major bug in private filterItemsAsync() method. #759

Open
mecoFarid opened this issue Apr 30, 2020 · 0 comments
Open

Probable major bug in private filterItemsAsync() method. #759

mecoFarid opened this issue Apr 30, 2020 · 0 comments

Comments

@mecoFarid
Copy link

filterItemsAsync() always checks for a new filter. If filter parameters haven't been changed then filtering will be omitted here:

private synchronized void filterItemsAsync(@NonNull List<T> unfilteredItems) {
        // Omitted for brevity 
        if (hasFilter() && hasNewFilter(mFilterEntity)) { //skip when filter is unchanged

        }
    }

Steps to reproduce:
Let's take a simple situation where each item has a status field called isSent.

  1. Add a few items to the adapter where isSent = false
  2. Apply filter where only items with isSent = false should be visible
  3. Change status of any single item item to isSent = true and the call FlexibleAdapter.filterItems()
  4. Since the filter itself hasn't changed, the filtering will, simply, be omitted
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

No branches or pull requests

1 participant