Skip to content

Remember last volume state when closing/reopening application#606

Merged
jacksongoode merged 1 commit intojpochyla:mainfrom
lukesnc:remember-last-volume
May 1, 2025
Merged

Remember last volume state when closing/reopening application#606
jacksongoode merged 1 commit intojpochyla:mainfrom
lukesnc:remember-last-volume

Conversation

@lukesnc
Copy link
Copy Markdown
Contributor

@lukesnc lukesnc commented Apr 30, 2025

No description provided.

@jacksongoode
Copy link
Copy Markdown
Collaborator

This is good, but it might make sense to add some debounce so that we aren't writing to the config every time we scroll the slider.

@lukesnc
Copy link
Copy Markdown
Contributor Author

lukesnc commented May 1, 2025

Forgive me if I'm misunderstanding the code, but I'm pretty sure what I added would work so that the write to config would only occur when the main window was being closed, which is when we'd save the config and close all windows anyway. I added debug statements on my end just to double check and it seems like the write only occurs on app exit

@jacksongoode jacksongoode merged commit 78e7dbb into jpochyla:main May 1, 2025
5 checks passed
@Pogodaanton
Copy link
Copy Markdown
Contributor

Would this save the current volume in case of a crash, too?

@jacksongoode
Copy link
Copy Markdown
Collaborator

No it wouldn't, but that would require saving on volume change, which could be an improvement to this if someone desired to make a PR for it.

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