mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Feat/2334 channel indicators (#2356)
Signed-off-by: DaneEvans <dane@goneepic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ffd399f44d
commit
aa9ce9dfdf
15 changed files with 318 additions and 98 deletions
|
|
@ -176,8 +176,7 @@ data class Contact(
|
|||
val messageCount: Int,
|
||||
val isMuted: Boolean,
|
||||
val isUnmessageable: Boolean,
|
||||
val nodeColors: Pair<Int, Int>? = null,
|
||||
val isDefaultPSK: Boolean? = false
|
||||
val nodeColors: Pair<Int, Int>? = null
|
||||
)
|
||||
|
||||
@Suppress("LongParameterList", "LargeClass")
|
||||
|
|
@ -520,15 +519,6 @@ class UIViewModel @Inject constructor(
|
|||
} else {
|
||||
user.longName
|
||||
}
|
||||
val isDefaultPSK = if (toBroadcast) {
|
||||
val _channel = channelSet.getChannel(data.channel)
|
||||
val isDefaultPSK = (_channel?.settings?.psk?.size() == 1 &&
|
||||
_channel.settings.psk.byteAt(0) == 1.toByte()) ||
|
||||
_channel?.settings?.psk?.toByteArray()?.isEmpty() == true
|
||||
isDefaultPSK
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
Contact(
|
||||
contactKey = contactKey,
|
||||
|
|
@ -544,8 +534,7 @@ class UIViewModel @Inject constructor(
|
|||
node.colors
|
||||
} else {
|
||||
null
|
||||
},
|
||||
isDefaultPSK = isDefaultPSK
|
||||
}
|
||||
)
|
||||
}
|
||||
}.stateIn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue