Merge branch 'audio2' into 'master'

HOTFIX: Fix `PreferenceSubscreenAudioExit()` being unable to handle nullish player notification settings

See merge request 
This commit is contained in:
BondageProjects 2025-03-18 21:04:49 +00:00
commit c4acdfd338
2 changed files with 2 additions and 2 deletions
BondageClub/Screens/Character/Preference

View file

@ -81,7 +81,7 @@ function PreferenceSubscreenAudioExit() {
// If audio has been disabled for notifications, disable each individual notification audio setting
if (!Player.AudioSettings.Notifications) {
for (const setting in Player.NotificationSettings) {
let audio = Player.NotificationSettings[setting].Audio;
let audio = Player.NotificationSettings[setting]?.Audio;
if (typeof audio === 'number' && audio > 0) Player.NotificationSettings[setting].Audio = NotificationAudioType.NONE;
}
}

View file

@ -1015,7 +1015,7 @@ var PreferenceNotificationSettingsDefault = {
Test: { Audio: NotificationAudioType.NONE, AlertType: NotificationAlertType.TITLEPREFIX },
// Those are deprecated
Audio: false,
Audio: undefined,
Chat: undefined,
ChatActions: undefined,
};