remove isAlwaysPowered

This commit is contained in:
andrekir 2022-03-28 09:11:06 -03:00
parent 879bd574c1
commit a6fb214852
3 changed files with 0 additions and 33 deletions

View file

@ -20,7 +20,6 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -154,17 +153,6 @@ class UIViewModel @Inject constructor(
}
}
var isAlwaysPowered: Boolean?
get() = radioConfig.value?.preferences?.isAlwaysPowered
set(value) {
val config = radioConfig.value
if (value != null && config != null) {
val builder = config.toBuilder()
builder.preferencesBuilder.isAlwaysPowered = value
setRadioConfig(builder.build())
}
}
var region: RadioConfigProtos.RegionCode
get() = meshService?.region?.let { RadioConfigProtos.RegionCode.forNumber(it) }
?: RadioConfigProtos.RegionCode.Unset