rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
147 stars 23 forks source link

Endless Scrolling: fix bug that calculates wrong last page #1200

Closed C-O-S closed 5 years ago

C-O-S commented 5 years ago

Description When removing games using the Add / Remove hidden games feature, the removal progress count is displaying an inaccurate progress count (basically a dividend larger than divisor situation).

In the screenshot below you'll note page 605 of 243 or approximately 249% complete.

Steps to Reproduce

  1. Go to "https://www.steamgifts.com/account/settings/giveaways/filters"
  2. Click on "Add/Remove feature button"
  3. Select -> Remove
  4. See error

Expected Behavior Display of an accurate progress count.

Console Errors None presented.

Screenshots annotation 2019-02-13 110457

System (please complete the following information):

rafaelgomesxyz commented 5 years ago

How many pages do you have of hidden games?

C-O-S commented 5 years ago

In this instance the wishlist it is working through contains 1573 "games". It clears the progress indicator at the end of the operation so I'm not quite sure exactly how many pages it's working through in total once I click remove.

However, the estimate has now changed to read "Removing games (page XXX of 81)..." and seems to reach around approximately 720 pages before clearing itself.

C-O-S commented 5 years ago

In answer to your other question, were I to add all owned games using this feature:

Number of Steam games reported on SteamGifts: 15,341 Number according to Steam Profile page: 13,242 Games Owned, 9,345 DLC Owned

rafaelgomesxyz commented 5 years ago

Wait, I don't understand. I asked how many pages of hidden games you have, not owned games.

C-O-S commented 5 years ago

Sorry, I had continuous scrolling on for the filters page.

Upon turning it off and jumping to the end I have the answer: 730 pages. https://www.steamgifts.com/account/settings/giveaways/filters/search?page=730

rafaelgomesxyz commented 5 years ago

Thank you, I'll see if I can find the issue.

rafaelgomesxyz commented 5 years ago

Does it happen if you do it with Endless Scrolling turned off?

C-O-S commented 5 years ago

I just disabled Endless Scrolling, per your question, and started the removal process. The count now seems to be correct and is counting up "page X of 730". It looks like that might be the issue.