fix issue #387 collected items for sale visibility #389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in issue #387, @Zir0h pointed out where in the code this was likely happening. I read through the code for the collections page and could not understand the need to filter on FILTER_FOR_SALE and FILTER_NOT_FOR_SALE as it didn't align with the functionality we wanted for the page. The main goal here is to display all items a collector has acquired, irrespective of whether these items are currently listed for sale or not. This ensures a more consistent and user-friendly experience, where collectors can view their entire collection in one place.
In this pull request, I have removed the FILTER_FOR_SALE and FILTER_NOT_FOR_SALE filters and replaced them with a single FILTER_COLLECTED filter. This new filter effectively shows all tokens collected by the user that they didn't create themselves. The change simplifies the filtering logic and aligns the collections page with the intended purpose of showcasing all acquired items, making it easier for users to manage and view their collections.
This update should resolve the issue where tokens disappeared from the collection upon being listed for sale, as now all collected items remain visible regardless of their sale status. I'm not that good at JavaScript though, so someone should review this for any syntax issue.