mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix code review feedback: simplify signal icon logic and fix spelling
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/07fad82b-9a10-4db0-a0b0-445d8ef28e50 Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
parent
183223e522
commit
98afec1b81
2 changed files with 2 additions and 10 deletions
|
|
@ -143,15 +143,7 @@ struct DeviceConnectionView: View {
|
|||
|
||||
@ViewBuilder
|
||||
private func signalIcon(rssi: Int) -> some View {
|
||||
let imageName: String
|
||||
if rssi > -65 {
|
||||
imageName = "wifi"
|
||||
} else if rssi > -85 {
|
||||
imageName = "wifi"
|
||||
} else {
|
||||
imageName = "wifi.exclamationmark"
|
||||
}
|
||||
Image(systemName: imageName)
|
||||
Image(systemName: rssi > -85 ? "wifi" : "wifi.exclamationmark")
|
||||
.font(.system(size: 12))
|
||||
.foregroundStyle(rssi > -65 ? .green : (rssi > -85 ? .yellow : .red))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ private struct WatchCompassLabel {
|
|||
// MARK: - Color helper
|
||||
|
||||
extension Color {
|
||||
/// Quick luminance check so centre text is readable on the distance colour.
|
||||
/// Quick luminance check so center text is readable on the distance color.
|
||||
var isWatchLight: Bool {
|
||||
// Approximate: yellow and lighter colours are "light"
|
||||
if self == .yellow || self == .orange || self == .white { return true }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue