[Fix] Wishlist filter on Deals screen leaves no way out (#5588)#5602
Open
flavioislima wants to merge 3 commits into
Open
[Fix] Wishlist filter on Deals screen leaves no way out (#5588)#5602flavioislima wants to merge 3 commits into
flavioislima wants to merge 3 commits into
Conversation
Add a new getGogWishlist IPC handler that returns the user's wishlist product IDs from embed.gog.com, and drop the wishlist=eq:true query from getGogDiscounts. The frontend will now apply the wishlist filter against the locally fetched product list instead of re-fetching from GOG, which prevents the deals grid from emptying when nothing in the wishlist is on sale.
…5588) Apply wishlistOnly as a client-side filter using the IDs fetched from the new getGogWishlist endpoint, and render the filter bar whenever filters are active even if no products match. Previously, toggling "Wishlist only" triggered a backend refetch that wiped the products list and hid the filter bar entirely, leaving the user no way to untoggle without changing the store region.
Both checkboxes are already hidden from the filter bar when the user is not signed in, but their persisted localStorage state still drove the filtering and the discounts refetch. That caused two confusing outcomes after logging out: the grid could appear empty for no visible reason, and getGogDiscounts was called with hideOwned=true which the backend silently turns off — adding noise to the logs. Treat both toggles as off whenever isGogLoggedIn is false while preserving the underlying preference for the next login.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #5588.
getGogWishlistIPC handler that returns the user's GOG wishlist product IDs (fetched fromembed.gog.com/user/wishlist.json).getGogDiscountsno longer accepts/forwardswishlistOnly; the discount list is always the full sale catalog.hideDlcs,genres, etc. work — toggling it never re-fetches the catalog.Why
Previously, toggling "Wishlist Only" triggered a backend refetch with
wishlist=eq:true. If the user had nothing in their wishlist on sale, GOG returned zero products, the filters bar (rendered only whenproducts.length > 0) disappeared, and the user was stuck on an empty page until they changed the store region to force a different fetch.Test plan
hideOwned=trueeven if a previous logged-in session left those toggles on.