mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge branch 'main'
#Conflicts: # Meshtastic.xcodeproj/project.pbxproj # Meshtastic/Views/Messages/MessageText.swift
This commit is contained in:
commit
04eb695d32
2 changed files with 16 additions and 1 deletions
|
|
@ -652,6 +652,20 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
retained: decodedInfo.mqttClientProxyMessage.retained
|
||||
)
|
||||
mqttManager.mqttClientProxy?.publish(message)
|
||||
} else if decodedInfo.payloadVariant == FromRadio.OneOf_PayloadVariant.clientNotification(decodedInfo.clientNotification) {
|
||||
let manager = LocalNotificationManager()
|
||||
manager.notifications = [
|
||||
Notification(
|
||||
id: UUID().uuidString,
|
||||
title: "Firmware Notification",
|
||||
subtitle: "\(decodedInfo.clientNotification.level)".capitalized,
|
||||
content: decodedInfo.clientNotification.message,
|
||||
target: "settings",
|
||||
path: "meshtastic:///settings/debugLogs"
|
||||
)
|
||||
]
|
||||
manager.schedule()
|
||||
Logger.data.error("⚠️ Client Notification \((try? decodedInfo.clientNotification.jsonString()) ?? "JSON Decode Failure")")
|
||||
}
|
||||
|
||||
switch decodedInfo.packet.decoded.portnum {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ struct MessageText: View {
|
|||
.background(isCurrentUser ? .accentColor : Color(.gray))
|
||||
.cornerRadius(15)
|
||||
.overlay {
|
||||
if message.pkiEncrypted && message.ackError <= 0 && (message.realACK || message.ackError == nil) {
|
||||
/// Show the lock if the message is pki encrypted and has a real ack if sent by the current user, or is pki encrypted for incoming messages
|
||||
if message.pkiEncrypted && message.realACK || !isCurrentUser && message.pkiEncrypted {
|
||||
VStack(alignment: .trailing) {
|
||||
Spacer()
|
||||
HStack {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue