Add Announce Background Messages setting and descriptive footers
- New "Announce Background Messages" toggle in Accessibility section (off by default) — VoiceOver announces messages from non-active buffers when enabled - Rename "Other Buffers" to "Background Buffer Sounds" in Sounds section - Add footer descriptions to Save Debug Buffer, Background Buffer Sounds, Status Haptics, and Announce Background Messages
This commit is contained in:
parent
0e36f8b5ff
commit
25bb6d1b54
2 changed files with 28 additions and 6 deletions
|
|
@ -49,8 +49,9 @@ struct ChatBufferView: View {
|
||||||
playBufferSound()
|
playBufferSound()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce + haptic — active buffer only
|
// Announce + haptic
|
||||||
if isActive {
|
let announceOther = UserDefaults.standard.bool(forKey: "announce_other_buffers")
|
||||||
|
if isActive || announceOther {
|
||||||
if !last.isSystem {
|
if !last.isSystem {
|
||||||
AccessibilityNotification.Announcement(
|
AccessibilityNotification.Announcement(
|
||||||
"\(last.senderName): \(last.content)"
|
"\(last.senderName): \(last.content)"
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ struct SettingsView: View {
|
||||||
@AppStorage("sounds_map") private var mapSound = true
|
@AppStorage("sounds_map") private var mapSound = true
|
||||||
@AppStorage("sounds_dm") private var dmSound = true
|
@AppStorage("sounds_dm") private var dmSound = true
|
||||||
@AppStorage("sounds_background_buffers") private var backgroundBufferSounds = true
|
@AppStorage("sounds_background_buffers") private var backgroundBufferSounds = true
|
||||||
|
@AppStorage("announce_other_buffers") private var announceOtherBuffers = false
|
||||||
@Environment(\.modelContext) private var modelContext
|
@Environment(\.modelContext) private var modelContext
|
||||||
@State private var showDeleteConfirmation = false
|
@State private var showDeleteConfirmation = false
|
||||||
|
|
||||||
|
|
@ -43,7 +44,7 @@ struct SettingsView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
Section("Messages") {
|
Section {
|
||||||
Toggle("Save Messages", isOn: $saveMessages)
|
Toggle("Save Messages", isOn: $saveMessages)
|
||||||
Toggle("Save Debug Buffer", isOn: $saveDebugBuffer)
|
Toggle("Save Debug Buffer", isOn: $saveDebugBuffer)
|
||||||
.disabled(!saveMessages)
|
.disabled(!saveMessages)
|
||||||
|
|
@ -67,9 +68,13 @@ struct SettingsView: View {
|
||||||
} message: {
|
} message: {
|
||||||
Text("Are you sure you want to delete all messages from all buffers?")
|
Text("Are you sure you want to delete all messages from all buffers?")
|
||||||
}
|
}
|
||||||
|
} header: {
|
||||||
|
Text("Messages")
|
||||||
|
} footer: {
|
||||||
|
Text("Save Debug Buffer saves system and debug messages between sessions.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("Sounds") {
|
Section {
|
||||||
Toggle("Sounds", isOn: $soundsEnabled)
|
Toggle("Sounds", isOn: $soundsEnabled)
|
||||||
Toggle("Global Chat", isOn: $globalSound)
|
Toggle("Global Chat", isOn: $globalSound)
|
||||||
.disabled(!soundsEnabled)
|
.disabled(!soundsEnabled)
|
||||||
|
|
@ -77,16 +82,32 @@ struct SettingsView: View {
|
||||||
.disabled(!soundsEnabled)
|
.disabled(!soundsEnabled)
|
||||||
Toggle("Direct Messages", isOn: $dmSound)
|
Toggle("Direct Messages", isOn: $dmSound)
|
||||||
.disabled(!soundsEnabled)
|
.disabled(!soundsEnabled)
|
||||||
Toggle("Other Buffers", isOn: $backgroundBufferSounds)
|
Toggle("Background Buffer Sounds", isOn: $backgroundBufferSounds)
|
||||||
.disabled(!soundsEnabled)
|
.disabled(!soundsEnabled)
|
||||||
|
} header: {
|
||||||
|
Text("Sounds")
|
||||||
|
} footer: {
|
||||||
|
Text("Background Buffer Sounds plays sounds for messages in buffers you're not currently viewing.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("Haptics") {
|
Section {
|
||||||
Toggle("Haptics", isOn: $hapticsEnabled)
|
Toggle("Haptics", isOn: $hapticsEnabled)
|
||||||
Toggle("Message Haptics", isOn: $messageHaptics)
|
Toggle("Message Haptics", isOn: $messageHaptics)
|
||||||
.disabled(!hapticsEnabled)
|
.disabled(!hapticsEnabled)
|
||||||
Toggle("Status Haptics", isOn: $statusHaptics)
|
Toggle("Status Haptics", isOn: $statusHaptics)
|
||||||
.disabled(!hapticsEnabled)
|
.disabled(!hapticsEnabled)
|
||||||
|
} header: {
|
||||||
|
Text("Haptics")
|
||||||
|
} footer: {
|
||||||
|
Text("Status Haptics provides feedback for system events such as connect and disconnect.")
|
||||||
|
}
|
||||||
|
|
||||||
|
Section {
|
||||||
|
Toggle("Announce Background Messages", isOn: $announceOtherBuffers)
|
||||||
|
} header: {
|
||||||
|
Text("Accessibility")
|
||||||
|
} footer: {
|
||||||
|
Text("When on, VoiceOver announces new messages from buffers you're not currently viewing.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue