mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 21:45:22 +00:00
Keep recording-error alerts from ending the open DM
Voice recording happens inside the people/DM sheet, but its error alert was still presented unconditionally from the root view. A mic-permission failure therefore force-dismissed the sheet and ended the conversation through exactly the reconciliation path this branch fixes for the Bluetooth alert. Treat it the same way: the sheet-dismiss guard now also ignores reconciliation while the voice alert is up, the root copy of the alert defers to any other root modal (people sheet included), and the sheet presents its own copy gated on the sheet's modal state. The voice alert keeps priority over the Bluetooth alert on both levels via the existing isVoiceAlertPresented flag, now mirrored into the people-sheet state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -579,6 +579,20 @@ struct ViewSmokeTests {
|
||||
)
|
||||
}
|
||||
|
||||
@Test("Bluetooth alerts wait for the voice recording error alert")
|
||||
func bluetoothAlertGuards_includeVoiceAlert() {
|
||||
#expect(
|
||||
ContentRootModalPresentationState(
|
||||
isVoiceAlertPresented: true
|
||||
).hasPresentation
|
||||
)
|
||||
#expect(
|
||||
ContentPeopleSheetModalPresentationState(
|
||||
isVoiceAlertPresented: true
|
||||
).hasPresentation
|
||||
)
|
||||
}
|
||||
|
||||
@Test("Root Bluetooth alert waits for screenshot privacy alert")
|
||||
@MainActor
|
||||
func rootBluetoothAlertGuard_tracksScreenshotPrivacyState() {
|
||||
|
||||
Reference in New Issue
Block a user