From ec8ca6e455b2a19bdce1d652fe252948a5af9502 Mon Sep 17 00:00:00 2001 From: Taksh Date: Fri, 25 Sep 2026 21:31:25 +0530 Subject: [PATCH] fix: only show bridged mesh warning when nearby-only is off Bridge-on plus nearby-only still keeps #mesh radio-local, so the Nostr-relay wording must not fire in that case. --- bitchat/Views/Components/MeshPlaintextNoticeView.swift | 7 ++++++- bitchat/Views/ContentComposerView.swift | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bitchat/Views/Components/MeshPlaintextNoticeView.swift b/bitchat/Views/Components/MeshPlaintextNoticeView.swift index d9fffb7b..89d48ec7 100644 --- a/bitchat/Views/Components/MeshPlaintextNoticeView.swift +++ b/bitchat/Views/Components/MeshPlaintextNoticeView.swift @@ -10,7 +10,10 @@ import SwiftUI /// Dismissible banner reminding people that #mesh is a plaintext broadcast (#1064). struct MeshPlaintextNoticeView: View { + /// Bridge feature is on in settings. var bridgeEnabled: Bool + /// Outgoing mesh stays radio-local even when the bridge feature is on. + var nearbyOnly: Bool var onDismiss: () -> Void @ThemedPalette private var palette @@ -37,8 +40,10 @@ struct MeshPlaintextNoticeView: View { ) } + /// Bridged exposure only applies when the bridge is on *and* nearby-only + /// is off — otherwise outgoing #mesh stays radio-local. private var bodyText: String { - bridgeEnabled ? Strings.bodyBridged : Strings.bodyNearbyOnly + (bridgeEnabled && !nearbyOnly) ? Strings.bodyBridged : Strings.bodyNearbyOnly } var body: some View { diff --git a/bitchat/Views/ContentComposerView.swift b/bitchat/Views/ContentComposerView.swift index aa340032..c6731a92 100644 --- a/bitchat/Views/ContentComposerView.swift +++ b/bitchat/Views/ContentComposerView.swift @@ -34,7 +34,10 @@ struct ContentComposerView: View { var body: some View { VStack(alignment: .leading, spacing: 6) { if showsMeshPlaintextNotice { - MeshPlaintextNoticeView(bridgeEnabled: bridgeService.isEnabled) { + MeshPlaintextNoticeView( + bridgeEnabled: bridgeService.isEnabled, + nearbyOnly: bridgeService.nearbyOnly + ) { meshPlaintextNoticeDismissed = true MeshPlaintextNoticeSettings.isDismissed = true }