mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Only share messagable contacts
This commit is contained in:
parent
d84e437180
commit
16ad1ecfce
4 changed files with 17 additions and 10 deletions
|
|
@ -17666,6 +17666,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Messaging" : {
|
||||
|
||||
},
|
||||
"Metric" : {
|
||||
"localizations" : {
|
||||
|
|
@ -32903,7 +32906,7 @@
|
|||
"Unmessagable" : {
|
||||
|
||||
},
|
||||
"Unmonitored or Infrastructure" : {
|
||||
"Unmonitored" : {
|
||||
|
||||
},
|
||||
"Unset" : {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ extension NodeInfoEntity {
|
|||
userProto.shortName = user.shortName ?? ""
|
||||
userProto.hwModel = HardwareModel(rawValue: Int(user.hwModelId)) ?? .unset
|
||||
userProto.isLicensed = user.isLicensed
|
||||
userProto.isUnmessagable = false
|
||||
if userProto.hasIsUnmessagable == true {
|
||||
userProto.isUnmessagable = user.unmessagable
|
||||
}
|
||||
userProto.role = Config.DeviceConfig.Role(rawValue: Int(user.role)) ?? .client
|
||||
userProto.publicKey = user.publicKey?.subdata(in: 0..<user.publicKey!.count) ?? Data()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,13 +154,13 @@ struct NodeDetail: View {
|
|||
if node.user?.unmessagable ?? false {
|
||||
HStack {
|
||||
Label {
|
||||
Text("")
|
||||
Text("Messaging")
|
||||
} icon: {
|
||||
Image(systemName: "iphone.slash")
|
||||
.symbolRenderingMode(.multicolor)
|
||||
}
|
||||
Spacer()
|
||||
Text("Unmonitored or Infrastructure")
|
||||
Text("Unmonitored")
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,12 +80,14 @@ struct NodeList: View {
|
|||
/// Allow users to mute notifications for a node even if they are not connected
|
||||
if let user = node.user {
|
||||
NodeAlertsButton(context: context, node: node, user: user)
|
||||
Button(action: {
|
||||
shareContactNode = node
|
||||
isPresentingShareContactQR = true
|
||||
}) {
|
||||
Label("Share Contact QR", systemImage: "qrcode")
|
||||
}
|
||||
if !user.unmessagable {
|
||||
Button(action: {
|
||||
shareContactNode = node
|
||||
isPresentingShareContactQR = true
|
||||
}) {
|
||||
Label("Share Contact QR", systemImage: "qrcode")
|
||||
}
|
||||
}
|
||||
}
|
||||
if let connectedNode {
|
||||
/// Favoriting a node requires being connected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue