mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
This commit is contained in:
parent
c170ff6a4b
commit
1f26c25fe9
1 changed files with 3 additions and 2 deletions
|
|
@ -42,6 +42,7 @@ import org.meshtastic.core.service.MeshServiceNotifications
|
|||
import org.meshtastic.core.service.ServiceAction
|
||||
import org.meshtastic.core.service.ServiceRepository
|
||||
import org.meshtastic.core.ui.viewmodel.stateInWhileSubscribed
|
||||
import org.meshtastic.proto.ConfigProtos.Config.DeviceConfig.Role
|
||||
import org.meshtastic.proto.channelSet
|
||||
import org.meshtastic.proto.sharedContact
|
||||
import timber.log.Timber
|
||||
|
|
@ -130,7 +131,7 @@ constructor(
|
|||
if (channel == null) { // no channel specified, so we assume it's a direct message
|
||||
val fwVersion = ourNodeInfo.value?.metadata?.firmwareVersion
|
||||
val destNode = nodeRepository.getNode(dest)
|
||||
|
||||
val isClientBase = ourNodeInfo.value?.user?.role == Role.CLIENT_BASE
|
||||
fwVersion?.let { fw ->
|
||||
val ver = DeviceVersion(asString = fw)
|
||||
val verifiedSharedContactsVersion =
|
||||
|
|
@ -141,7 +142,7 @@ constructor(
|
|||
if (ver >= verifiedSharedContactsVersion) {
|
||||
sendSharedContact(destNode)
|
||||
} else {
|
||||
if (!destNode.isFavorite) {
|
||||
if (!destNode.isFavorite && !isClientBase) {
|
||||
favoriteNode(destNode)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue