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

Prevent Removing Other Window Current Versions #1394

Open
dsanders11 opened this issue Jul 8, 2023 · 0 comments · May be fixed by #1395
Open

Prevent Removing Other Window Current Versions #1394

dsanders11 opened this issue Jul 8, 2023 · 0 comments · May be fixed by #1395
Labels
area:versions ✨ enhancement New feature or request

Comments

@dsanders11
Copy link
Member

Currently the active version is prevented from being removed in Settings -> Electron, but if multiple windows are open this doesn't prevent one window from removing another window's active version, causing problems.

An elegant solution here could be Web locks - create a shared lock (version:<version>) on the version that a window is currently using, and release it when the current version is changed. Then modify the code that prevents removing an active version to check if a version is currently locked (navigator.locks.query wrapped inside a helper function). Potential problem with this approach is navigator.locks.query is async, and the current UI doesn't handle async state. Looks like we could probably use react-async for the moment (with an upgrade from React v16.14 to v16.18) and then use Suspense in the future when React is upgraded to v18+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:versions ✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant