Fix crash when opening settings after a custom sound file goes missing - #26
Open
GustavoFringo140 wants to merge 3 commits into
Open
Fix crash when opening settings after a custom sound file goes missing#26GustavoFringo140 wants to merge 3 commits into
GustavoFringo140 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25
Crashing Equicord when trying to access plugin's settings. It was normal until I wanted to add a new sound, I've put a custom .wav sound on Call Ringing and accidentally deleted the source file from my Downloads folder. After that, opening CustomSounds settings crashed my Equicord every time.
I fixed it myself for now by exporting my DataStore backup (Equicord Settings - Backup & Restore), cleaning the ScattrdCustomSounds entry manually, and importing it back. That got me unblocked, but the actual bug is still in the code nothing in audio.ts or index.tsx handles a broken/missing audio entry, so any override left pointing at a file that no longer exists in the store takes the whole settings panel down instead of just falling back to default.
This PR adds that missing error handling
With this in, the same situation (upload didn't fully save, file got deleted, storage got corrupted, whatever) just silently resets to default instead of crashing the client.
Will be sent to Equicord's plugin implementation too