From d1f39833ab041f249d68d04fb423dc55ef6a5554 Mon Sep 17 00:00:00 2001 From: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:54:12 -0700 Subject: [PATCH] Fix qr code not showing --- Meshtastic/Views/Nodes/NodeList.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Meshtastic/Views/Nodes/NodeList.swift b/Meshtastic/Views/Nodes/NodeList.swift index 8b2558be..fb0baf62 100644 --- a/Meshtastic/Views/Nodes/NodeList.swift +++ b/Meshtastic/Views/Nodes/NodeList.swift @@ -40,7 +40,6 @@ struct NodeList: View { @State private var isPresentingPositionFailedAlert = false @State private var isPresentingDeleteNodeAlert = false @State private var deleteNodeId: Int64 = 0 - @State private var isPresentingShareContactQR = false @State private var shareContactNode: NodeInfoEntity? var boolFilters: [Bool] {[ @@ -83,7 +82,6 @@ struct NodeList: View { if !user.unmessagable { Button(action: { shareContactNode = node - isPresentingShareContactQR = true }) { Label("Share Contact QR", systemImage: "qrcode") } @@ -234,12 +232,8 @@ struct NodeList: View { } } } - .sheet(isPresented: $isPresentingShareContactQR) { - if let node = shareContactNode { - ShareContactQRDialog(node: node.toProto()) - } else { - EmptyView() - } + .sheet(item: $shareContactNode) { selectedNode in + ShareContactQRDialog(node: selectedNode.toProto()) } .navigationSplitViewColumnWidth(min: 100, ideal: 250, max: 500) .navigationBarItems(