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

fix(electron): save AlwaysOnTop preferences to avoid setting insconsistencies #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dubisdev
Copy link
Contributor

@sekwah41
Copy link
Member

sekwah41 commented Feb 2, 2024

Ill try to test after work today or tomorrow and see if I can reproduce this and if it effects the tauri version, see if the always on top is triggering and if not why though I already assume you've done this. I just wanted to check that this isn't an issue that's somehow not effecting tauri but is effecting electron or if it need a common fix.

@dubisdev
Copy link
Contributor Author

dubisdev commented Feb 2, 2024

I checked both Tauri and Electron connectors in the renderer app.

Both are using the useEffect to inform the backend of this setting on app start. Anyway, take a look in case I missed something :)

@sekwah41
Copy link
Member

sekwah41 commented Feb 7, 2024

Sorry haven't had a chance to test this yet given the nature of wanting to test the startup behaviour needing to reboot. Code looks fine though I'll perform a local test first.

@sekwah41
Copy link
Member

sekwah41 commented Feb 11, 2024

Noticed the latest version release on Tauri has the issue on restart too on windows at least. This probably needs a frontend change to emit these settings on ready though this may be a good idea too.

@dubisdev
Copy link
Contributor Author

Yeah! The problem I see here is that we are already doing that 😟 Both connectors emmit the event on the app load so this should be working.

useEffect(() => {
send(SET_ALWAYS_ON_TOP, {
alwaysOnTop: settings.alwaysOnTop,
});
}, [send, settings.alwaysOnTop]);

useEffect(() => {
electron.send(SET_ALWAYS_ON_TOP, {
alwaysOnTop: settings.alwaysOnTop,
});
}, [electron, settings.alwaysOnTop]);

BTW I cannot reproduce this (I'm using windows and all is working well for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants