diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/CalculatorScreen.kt b/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/CalculatorScreen.kt index 16d9402c..a3743a1d 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/CalculatorScreen.kt +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/CalculatorScreen.kt @@ -215,7 +215,9 @@ fun LteCalculators(viewModel: CalculatorViewModel) { // 4G LTE Cell ID calculator CardItem { Column { + val lteSectorIdOutput by viewModel.lteSectorIdOutput.collectAsState() val lteCidError by viewModel.lteCidError.collectAsState() + val collectAsState by viewModel.enbIdOutput.collectAsState() TitleText(text = "Cell ID to eNB ID and Sector ID") @@ -232,11 +234,11 @@ fun LteCalculators(viewModel: CalculatorViewModel) { ) Spacer(modifier = Modifier.height(6.dp)) Text( - "eNodeB ID: ${viewModel.enbIdOutput.collectAsState().value}", + "eNodeB ID: $collectAsState", modifier = Modifier.padding(start = 8.dp) ) Text( - "Sector ID: ${viewModel.lteSectorIdOutput.collectAsState().value}", + "Sector ID: $lteSectorIdOutput", modifier = Modifier.padding(start = 8.dp) ) diff --git a/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/model/CalculatorViewModel.kt b/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/model/CalculatorViewModel.kt index 16c92222..49861c7b 100644 --- a/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/model/CalculatorViewModel.kt +++ b/networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/model/CalculatorViewModel.kt @@ -70,7 +70,7 @@ class CalculatorViewModel : ViewModel() { val enbIdOutput: StateFlow = _enbIdOutput.asStateFlow() private val _lteSectorIdOutput = MutableStateFlow("") - val lteSectorIdOutput: StateFlow = _nrSectorIdOutput.asStateFlow() + val lteSectorIdOutput: StateFlow = _lteSectorIdOutput.asStateFlow() private val _pssOutput = MutableStateFlow("") val pssOutput: StateFlow = _pssOutput.asStateFlow()