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

WW page constantly refreshing #48

Closed
Shuri2060 opened this issue Jul 9, 2020 · 4 comments
Closed

WW page constantly refreshing #48

Shuri2060 opened this issue Jul 9, 2020 · 4 comments
Assignees
Labels
needs analysis Closer look required released

Comments

@Shuri2060
Copy link

Shuri2060 commented Jul 9, 2020

Description

The window for Individual WWs (where you send resources/favor) constantly refreshes. This only happens when you have over 400 favor in all 6 gods.

I think this is due to this line of code:

setTimeout(function(){RCGP.reloadContent()},100)

at

setTimeout(function(){RCGP.reloadContent()},100)

It reloads the window content after 100 ms, but in doing so the function is called again. This happens whenever the counter
counting down _shotTime goes to 0.

How to reproduce the problem

  • Have GRC running.
  • Open the window for any WW while you have 400+ favor on all 6 gods.

Expected behavior

No constant refreshes

Actual behavior

Continuous constant refreshes

How often

In en122

Additional information

  • Script version: 5.0.9
  • Operating system: Win 10
  • Used webbrowser: Firefox, Google Chrome
@Shuri2060
Copy link
Author

To fix this issue, add an if statement that only executes lines 2720 - 2726 if _shotTime isn't 0.

            if (_shotTime) { 
                            CM.register({main : RCGP.getContext().main, sub:"casted_powers"}, 'grcrt_countdown', _elem.countdown2({
                                            value : _shotTime,
                                            display: 'readable_seconds_with_days'
                                        }).on('cd:finish', function() {
                                            setTimeout(function(){RCGP.reloadContent()},100)
                                        })
                            );
            }

@Potusek Potusek self-assigned this Jul 9, 2020
@tomaski tomaski added the needs analysis Closer look required label Jul 10, 2020
@tomaski
Copy link
Member

tomaski commented Jul 10, 2020

hey @Shuri2060 thanks for taking the time to open the Issue.
That function's purpose is/was to reload the window so that the button to shorten the build can be clicked as soon as it becomes possible (otherwise you'd need to close and re-open the window).
Apparently, since that function was written, something's changed in Grepo code (as it always does).
The problem is: we have no way of verifying your solution (or troubleshooting ourselves) because we do not have an account on a WW world 😕 and we cannot blindly update the script as it will affect tens of thousands people using it.
Would you be interested in running some code inside your console window if needed?

@Shuri2060
Copy link
Author

Yeah sure.

Potusek added a commit that referenced this issue Aug 25, 2020
- fix constant page refresh when Wonder window opened
- fix internal Radar error
- fix spy report not converting
- add temple reports
- decrease font size for temple units
- add octopus to GRCRT buttons

closes #48
tomaski added a commit that referenced this issue Sep 3, 2020
- fix constant page refresh when Wonder window opened
- fix internal Radar error
- fix spy report not converting
- add temple reports
- decrease font size for temple units
- add octopus to GRCRT buttons
- spy report for abandoned city

Closes #48
@tomaski tomaski closed this as completed in ac7f18d Sep 3, 2020
tomaski pushed a commit that referenced this issue Sep 5, 2020
## [5.0.10](v5.0.9...v5.0.10) (2020-09-05)

### Bug Fixes

* broken URL for mobile reports ([9414af7](9414af7))
* change readme, update buildscripts ([d4ad0dc](d4ad0dc))
* various bugfixes and improvements ([ac7f18d](ac7f18d)), closes [#48](#48)
@tomaski
Copy link
Member

tomaski commented Sep 5, 2020

:tada: This issue has been resolved in version 5.0.10 :tada:

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs analysis Closer look required released
Projects
None yet
Development

No branches or pull requests

3 participants