Repository navigation
Allow deleting custom notification sounds - #6371
Open
feather2222 wants to merge 1 commit into
Open
feather2222 wants to merge 1 commit into
feather2222 wants to merge 1 commit into
Conversation
Custom notification sounds imported by the user could never be removed: there was no way to delete a bogus sound, or to re-import a sound with the same name. Long-pressing a custom sound in the sound picker now shows a 'Delete Sound' context menu action. After confirmation, the sound file is deleted and any references to it (the global notification sound and per-thread overrides) are cleared so they fall back to the default. Fixes signalapp#6351
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.
Contributor checklist
Administrative:
Commits and testing:
Description
Fixes #6351.
Custom notification sounds imported by the user could never be removed: there was no way to delete a bogus sound, and importing a replacement with the same name was silently ignored.
Changes
Sounds.deleteCustomSound(_:)(new public API): deletes the custom sound file and clears any references to it — per-thread sound overrides stored in the sounds key-value store, and the global notification sound preference (which also rewrites the fallback notification sound file). Affected threads/settings fall back to the default sound.OWSTableItem.init(text:…): gained an optionalcontextMenuActionProviderparameter (defaults tonil, no behavior change for existing callers).DeleteCustomSoundTestcases.Testing
Signalscheme for iOS Simulator (Xcode 26.2) successfully.DeleteCustomSoundTest/testDeleteCustomSound— passedDeleteCustomSoundTest/testDeleteCustomSoundClearsReferences— passedSoundsTest/testCustomSoundId— passedsetGlobalNotificationSoundpath when the deleted sound was the global one.