From 27ed8200450ba53d80eb18a89e66ae7815596d45 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 15 Jun 2025 20:23:42 -0700 Subject: [PATCH] Add locks to channels in messaging, update share channels icons to match --- Meshtastic/Views/Messages/ChannelList.swift | 7 +++++++ Meshtastic/Views/Settings/ShareChannels.swift | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Views/Messages/ChannelList.swift b/Meshtastic/Views/Messages/ChannelList.swift index 61f4fe00..fec3ab8b 100644 --- a/Meshtastic/Views/Messages/ChannelList.swift +++ b/Meshtastic/Views/Messages/ChannelList.swift @@ -58,6 +58,13 @@ struct ChannelList: View { VStack(alignment: .leading) { HStack { + if channel.psk?.hexDescription.count ?? 0 < 3 { + Image(systemName: "lock.slash.fill") + .foregroundColor(.red) + } else { + Image(systemName: "lock.fill") + .foregroundColor(.green) + } if channel.name?.isEmpty ?? false { if channel.role == 1 { Text(String("PrimaryChannel").camelCaseToWords()) diff --git a/Meshtastic/Views/Settings/ShareChannels.swift b/Meshtastic/Views/Settings/ShareChannels.swift index fa0e6370..9c7bdaa2 100644 --- a/Meshtastic/Views/Settings/ShareChannels.swift +++ b/Meshtastic/Views/Settings/ShareChannels.swift @@ -83,7 +83,7 @@ struct ShareChannels: View { .labelsHidden() Text(((channel.name!.isEmpty ? "Primary" : channel.name) ?? "Primary").camelCaseToWords()) if channel.psk?.hexDescription.count ?? 0 < 3 { - Image(systemName: "lock.slash") + Image(systemName: "lock.slash.fill") .foregroundColor(.red) } else { Image(systemName: "lock.fill")