Skip to content

Add endpoint to relaunch the app #212

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

WINBIGFOX
Copy link
Contributor

@WINBIGFOX WINBIGFOX commented Apr 26, 2025

Added a new /relaunch POST endpoint to restart the app with relaunch options. It uses app.relaunch with the current arguments and then quits the app. This ensures a seamless restart process for the application.

PR:
NativePHP/laravel: NativePHP/laravel#569

Added a new `/relaunch` POST endpoint to restart the app with relaunch options. It uses `app.relaunch` with the current arguments and then quits the app. This ensures a seamless restart process for the application.
Copy link
Member

@SRWieZ SRWieZ left a comment

Choose a reason for hiding this comment

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

Why adding --relaunch argument ?

It seems unnecessary, and it's there as an example in the docs.

Am I missing something ?

reference: https://www.electronjs.org/docs/latest/api/app#apprelaunchoptions

@WINBIGFOX
Copy link
Contributor Author

Hi @SRWieZ,

Yes, that's exactly what they did in the documentary. I understood that this makes sense because if an application can only have one instance, it can still be restarted in this way. With this argument, it would then be a different instance.

@WINBIGFOX
Copy link
Contributor Author

I just watched the docu again, I may have misunderstood it.
Would probably work reliably even without an argument.

Should I remove the argument again?

@SRWieZ
Copy link
Member

SRWieZ commented Apr 28, 2025

Yeah, I don't think it's necessary. Let's do without it for now.

Removed unnecessary custom arguments in the `app.relaunch` method. This simplifies the relaunch logic and ensures a cleaner implementation.
@WINBIGFOX
Copy link
Contributor Author

@SRWieZ I have removed the argument 🙂

@PeteBishwhip
Copy link
Member

@SRWieZ - Both PRs looks good and are approved. I'll leave the merging to you if you're comfortable that the plugin-build workflow is a flap and not an actual issue. Appears to be related to committing the build, so I would assume it's simply going to resolve on the main branch but I leave that to your professional eyes 👀

@WINBIGFOX - Thank you for your contributions! As usual, you're doing amazing stuff

@SRWieZ SRWieZ merged commit b394afe into NativePHP:main Apr 28, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants