feat(contact): add manually verified shared contact support (#3283)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich 2025-10-02 11:46:12 -05:00 committed by GitHub
parent 04991dbc5a
commit 24f0417b28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 826 additions and 9 deletions

View file

@ -75,8 +75,9 @@ import org.meshtastic.core.database.entity.ReactionEntity
AutoMigration(from = 17, to = 18),
AutoMigration(from = 18, to = 19),
AutoMigration(from = 19, to = 20),
AutoMigration(from = 20, to = 21),
],
version = 20,
version = 21,
exportSchema = true,
)
@TypeConverters(Converters::class)

View file

@ -61,6 +61,7 @@ data class NodeWithRelations(
powerMetrics = powerTelemetry.powerMetrics,
paxcounter = paxcounter,
notes = notes,
manuallyVerified = manuallyVerified,
)
}
@ -82,6 +83,7 @@ data class NodeWithRelations(
powerTelemetry = powerTelemetry,
paxcounter = paxcounter,
notes = notes,
manuallyVerified = manuallyVerified,
)
}
}
@ -122,6 +124,8 @@ data class NodeEntity(
var paxcounter: PaxcountProtos.Paxcount = PaxcountProtos.Paxcount.getDefaultInstance(),
@ColumnInfo(name = "public_key") var publicKey: ByteString? = null,
@ColumnInfo(name = "notes", defaultValue = "") var notes: String = "",
@ColumnInfo(name = "manually_verified", defaultValue = "0")
var manuallyVerified: Boolean = false, // ONLY set true when scanned/imported manually
) {
val deviceMetrics: TelemetryProtos.DeviceMetrics
get() = deviceTelemetry.deviceMetrics

View file

@ -53,6 +53,7 @@ data class Node(
val paxcounter: PaxcountProtos.Paxcount = PaxcountProtos.Paxcount.getDefaultInstance(),
val publicKey: ByteString? = null,
val notes: String = "",
val manuallyVerified: Boolean = false,
) {
val colors: Pair<Int, Int>
get() { // returns foreground and background @ColorInt for each 'num'