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

Refactor/fix: Wait until frontend is ready before processing protocol/args #1501

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Jun 19, 2022

With the current code, we process the protocol/args 3s after Heroic starts, this value is sometimes too much (if heroic starts really fast) and sometimes not enough (in slow computers like my Mac it takes more than those 3 second for the frontend to be ready).

Instead of having that delay, with this PR I added a message from the frontend to the backend to tell it it's ready, and then we process the protocol.

This will also help with issue I had with the desktop shortcut feature on Mac, since I think this was causing the problem described in my comment (my mac being slow taking more than 3 seconds to have the frontend ready) #723

How to Test/QA:

Change the electron script in package.json to be something like:

"electron": "yarn build-electron && electron . heroic://launch/Fortnite --trace-warnings",

Or any installed game, run yarn electron.

You can set a really small timeout to show what happens if that runs before the frontend is ready in the code without this fix.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jun 19, 2022
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants