Merge branch 'main'

#Conflicts:
#	Meshtastic.xcodeproj/project.pbxproj
#	Meshtastic/Views/Messages/MessageText.swift
This commit is contained in:
Garth Vander Houwen 2024-09-25 11:22:20 -07:00
commit 04eb695d32
2 changed files with 16 additions and 1 deletions

View file

@ -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 {

View file

@ -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 {