mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: import config missing data
This commit is contained in:
parent
7a01c4b228
commit
d71a9171ec
3 changed files with 4 additions and 4 deletions
|
|
@ -294,7 +294,7 @@ class RadioConfigViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
private val _deviceProfile = MutableStateFlow<DeviceProfile?>(null)
|
||||
val deviceProfile get() = _deviceProfile.value
|
||||
val deviceProfile: StateFlow<DeviceProfile?> get() = _deviceProfile
|
||||
|
||||
fun setDeviceProfile(deviceProfile: DeviceProfile?) {
|
||||
_deviceProfile.value = deviceProfile
|
||||
|
|
@ -314,7 +314,7 @@ class RadioConfigViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun exportProfile(uri: Uri) = viewModelScope.launch {
|
||||
val profile = deviceProfile ?: return@launch
|
||||
val profile = deviceProfile.value ?: return@launch
|
||||
writeToUri(uri, profile)
|
||||
_deviceProfile.value = null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue