mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: add encryption status icon and dialog to node list items
This commit is contained in:
parent
587c6c91f4
commit
22b1cf0f16
7 changed files with 87 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ import com.geeksville.mesh.Position
|
|||
import com.geeksville.mesh.TelemetryProtos
|
||||
import com.geeksville.mesh.copy
|
||||
import com.geeksville.mesh.util.latLongToMeter
|
||||
import com.google.protobuf.ByteString
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Entity(tableName = "nodes")
|
||||
|
|
@ -80,6 +81,8 @@ data class NodeEntity(
|
|||
}
|
||||
|
||||
val hasPKC get() = !user.publicKey.isEmpty
|
||||
val errorByteString: ByteString get() = ByteString.copyFrom(ByteArray(32) { 0 })
|
||||
val mismatchKey get() = user.publicKey == errorByteString
|
||||
|
||||
val batteryLevel get() = deviceMetrics.batteryLevel
|
||||
val voltage get() = deviceMetrics.voltage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue