I did some research in this bug and found the cause.
The bug only occures when no search term is used.
When no search term is used, the getAll(pageIndex, pageSize) paging method is used. The paging variables are supplied by the infinite_scroll_bloc.
The infinite_scroll_bloc uses a static pageSize of 10.
The getAll method returns 10 project, 6 of which are rejected or completed. The user applies the “Only Accepted” filter which filters the initial 10 results down to 4.
The infinite_scroll_bloc checks if it has reached the last page with the following check.
final isLastPage = newItems.length < _pageSize;
Because the result was filtered down to 4, the infinite_scroll_bloc thinks it has now reached the end and shows no more results. Causing possible other accepted projects to be dropped.
In general a paging method cannot be used if filtering is applied at a later stage.
Use the getAll() non-paging method and apply paging after the search term, tag and pillar filtering.
Implementation: GitHub - KingGorrin/syrius at fix-az-list
A filter tag is not applied when it results in an empty result.
This causes strange behaviour. For example, a non pillar user with no projects. Selecting “My Projects” has no result. Selecting “My Projects” and “Only Accepted” has results.
Non pillar owners only see active or owned (based on selected address) projects.
/* This method filters the projects according to the following rule: if a user doesn't have a Pillar, then we only show him the active projects */
This is by design but defeats the purpose of having the “My Projects” and “Only Accepted” filter tag when a user is not a pillar owner.