Skip to content
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

Audio beacon settings #125

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@


/* */
"beacon.settings_title" = "Beacon Settings";
"settings.beacon.title" = "Beacon Settings";

/* */
"beacon.settings.vicinity" = "Enter Vicinity Distance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@
/* Language display name. %1$@ is a language name, %2$@ is the country name. e.g. "English (United Kingdom)" {NumberedPlaceholder="%1$@", "%2$@"} */
"settings.language.language_name" = "%1$@ (%2$@)";



//------------------------------------------------------------------------------
// MARK: Settings (Audio)
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -509,8 +511,7 @@
//------------------------------------------------------------------------------

/* Title of the settings screen for beacons. This screen allows users to configure the way the audio beacon sounds. See Terms for the definition of "beacon". */
"beacon.settings_title" = "Beacon Settings";

"settings.beacon.title" = "Beacon Settings";

/* Title of a section in the beacon settings page where the user can select the distance threshold when a beacon automatically stops playing. */
"beacon.settings.vicinity" = "Enter Vicinity Distance";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ class SettingsViewController: BaseTableViewController {
private enum Section: Int, CaseIterable {
case general = 0
case audio = 1
case callouts = 2
case streetPreview = 3
case troubleshooting = 4
case about = 5
case telemetry = 6
case beacon = 2
case callouts = 3
case streetPreview = 4
case troubleshooting = 5
case about = 6
case telemetry = 7
}

private enum CalloutsRow: Int, CaseIterable {
Expand All @@ -33,12 +34,13 @@ class SettingsViewController: BaseTableViewController {
private static let cellIdentifiers: [IndexPath: String] = [
IndexPath(row: 0, section: Section.general.rawValue): "languageAndRegion",
IndexPath(row: 1, section: Section.general.rawValue): "voice",
IndexPath(row: 2, section: Section.general.rawValue): "beaconSettings",
IndexPath(row: 3, section: Section.general.rawValue): "volumeSettings",
IndexPath(row: 4, section: Section.general.rawValue): "manageDevices",
IndexPath(row: 5, section: Section.general.rawValue): "siriShortcuts",
IndexPath(row: 2, section: Section.general.rawValue): "volumeSettings",
IndexPath(row: 3, section: Section.general.rawValue): "manageDevices",
IndexPath(row: 4, section: Section.general.rawValue): "siriShortcuts",

IndexPath(row: 0, section: Section.audio.rawValue): "mixAudio",

IndexPath(row: 0, section: Section.beacon.rawValue): "beaconSettings",

IndexPath(row: CalloutsRow.all.rawValue, section: Section.callouts.rawValue): "allCallouts",
IndexPath(row: CalloutsRow.poi.rawValue, section: Section.callouts.rawValue): "poiCallouts",
Expand Down Expand Up @@ -83,8 +85,9 @@ class SettingsViewController: BaseTableViewController {
guard let sectionType = Section(rawValue: section) else { return 0 }

switch sectionType {
case .general: return 6
case .general: return 5
case .audio: return 1
case .beacon: return 1
case .callouts: return SettingsContext.shared.automaticCalloutsEnabled ? 5 : 1
case .streetPreview: return 1
case .troubleshooting: return 1
Expand Down Expand Up @@ -142,6 +145,7 @@ class SettingsViewController: BaseTableViewController {
switch sectionType {
case .general: return GDLocalizedString("settings.section.general")
case .audio: return GDLocalizedString("settings.audio.media_controls")
case .beacon: return GDLocalizedString("settings.beacon.title")
case .callouts: return GDLocalizedString("menu.manage_callouts")
case .about: return GDLocalizedString("settings.section.about")
case .streetPreview: return GDLocalizedString("preview.title")
Expand Down