-
Notifications
You must be signed in to change notification settings - Fork 31
Add Manage Callouts toggles for sound effects and delays #247
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,14 @@ protocol CalloutSettingsCellViewDelegate: AnyObject { | |
| } | ||
|
|
||
| internal enum CalloutSettingCellType { | ||
| <<<<<<< Updated upstream | ||
| case all, poi, mobility, beacon, shake | ||
| ======= | ||
| case all, soundEffects, delays, poi, beacon, shake | ||
| case transportation | ||
| case intersection | ||
| case safety | ||
| >>>>>>> Stashed changes | ||
|
Comment on lines
15
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
file='apps/ios/GuideDogs/Code/Visual UI/Controls/Settings/CalloutSettingsCellView.swift'
controller='apps/ios/GuideDogs/Code/Visual UI/View Controllers/Settings/SettingsViewController.swift'
echo "Conflict markers in the cell view:"
rg -n '^(<<<<<<<|=======|>>>>>>>)' "$file"
echo
echo "Callout setting cases referenced by the cell view and controller:"
rg -n '\.(all|soundEffects|delays|poi|mobility|transportation|safety|intersection|beacon|shake)\b' "$file" "$controller"Repository: soundscape-community/soundscape Length of output: 6958 🏁 Script executed: cat -n 'apps/ios/GuideDogs/Code/Visual UI/Controls/Settings/CalloutSettingsCellView.swift' | sed -n '10,130p'Repository: soundscape-community/soundscape Length of output: 5050 Finish the merge resolution and synchronize the enum with its switches. The file contains unresolved merge conflicts at lines 16–23 (enum), 42–49 (read switch), and 88–98 (write switch). After resolution, line 53 references 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| class CalloutSettingsCellView: UITableViewCell { | ||
|
|
@@ -32,7 +39,14 @@ class CalloutSettingsCellView: UITableViewCell { | |
| switch type { | ||
| case .all: | ||
| settingSwitch.isOn = SettingsContext.shared.automaticCalloutsEnabled | ||
| <<<<<<< Updated upstream | ||
| return | ||
| ======= | ||
| case .soundEffects: | ||
| settingSwitch.isOn = SettingsContext.shared.calloutSoundEffectsEnabled | ||
| case .delays: | ||
| settingSwitch.isOn = SettingsContext.shared.calloutDelaysEnabled | ||
| >>>>>>> Stashed changes | ||
| case .poi: | ||
| settingSwitch.isOn = SettingsContext.shared.placeSenseEnabled | ||
| return | ||
|
|
@@ -71,8 +85,17 @@ class CalloutSettingsCellView: UITableViewCell { | |
| case .all: | ||
| SettingsContext.shared.automaticCalloutsEnabled = isOn | ||
| GDATelemetry.track("settings.allow_callouts", value: isOn.description) | ||
| <<<<<<< Updated upstream | ||
| return | ||
|
|
||
| ======= | ||
| case .soundEffects: | ||
| SettingsContext.shared.calloutSoundEffectsEnabled = isOn | ||
| GDATelemetry.track("settings.callout_sound_effects", value: isOn.description) | ||
| case .delays: | ||
| SettingsContext.shared.calloutDelaysEnabled = isOn | ||
| GDATelemetry.track("settings.callout_delays", value: isOn.description) | ||
| >>>>>>> Stashed changes | ||
| case .poi: | ||
| // Places, Landmark, and Information Senses | ||
| SettingsContext.shared.placeSenseEnabled = isOn | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply the sound-effects toggle to the beacon-geofence earcon too.
The new flag is stored on the callout, but Line 94 still plays
GlyphSound(.beaconFound)unconditionally whencausedAudioDisabledis true. With Sound Effects turned off, that automatic destination path will still emit an earcon.Suggested fix
if causedAudioDisabled { - let earcon = GlyphSound(.beaconFound) var text = GDLocalizedString("beacon.beacon_location_within_audio_beacon_muted", formattedDistance) // Append suggestion to launch NaviLens if available at location if (poi != nil) && LocationDetail(entity: poi!).source.hasNaviLens { text += " " + GDLocalizedString("beacon.suggest_navilens") } let tts = TTSSound(text, at: markerLocation) + + guard includePrefixSound else { + return Sounds(tts) + } + + let earcon = GlyphSound(.beaconFound) guard let layered = LayeredSound(earcon, tts) else { return Sounds([earcon, tts]) }Also applies to: 66-115
🤖 Prompt for AI Agents