mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: improve import feedback and use begin/commit transactions
This commit is contained in:
parent
4047e8aebf
commit
37df3ce084
1 changed files with 3 additions and 4 deletions
|
|
@ -322,13 +322,13 @@ class RadioConfigViewModel @Inject constructor(
|
|||
|
||||
fun installProfile(protobuf: DeviceProfile) = with(protobuf) {
|
||||
_deviceProfile.value = null
|
||||
// meshService?.beginEditSettings()
|
||||
meshService?.beginEditSettings()
|
||||
if (hasLongName() || hasShortName()) destNode.value?.user?.let {
|
||||
val user = it.copy(
|
||||
longName = if (hasLongName()) longName else it.longName,
|
||||
shortName = if (hasShortName()) shortName else it.shortName
|
||||
)
|
||||
setOwner(user.toProto())
|
||||
if (it != user) setOwner(user.toProto())
|
||||
}
|
||||
if (hasChannelUrl()) try {
|
||||
setChannels(channelUrl)
|
||||
|
|
@ -360,8 +360,7 @@ class RadioConfigViewModel @Inject constructor(
|
|||
setModuleConfig(moduleConfig { detectionSensor = it.detectionSensor })
|
||||
setModuleConfig(moduleConfig { paxcounter = it.paxcounter })
|
||||
}
|
||||
setResponseStateSuccess()
|
||||
// meshService?.commitEditSettings()
|
||||
meshService?.commitEditSettings()
|
||||
}
|
||||
|
||||
fun clearPacketResponse() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue