mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-11-22 08:17:28 +00:00
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.
This commit is contained in:
parent
b469de7447
commit
ec8ca6e455
@ -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 {
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user