From e4568aab5ae1c38d1058854ff7cc228466014ec7 Mon Sep 17 00:00:00 2001 From: Andre Weber Date: Tue, 30 Jan 2024 13:53:57 +0100 Subject: [PATCH] chore: Minor Name Changes --- .../databroker/viewmodel/VssPropertiesViewModel.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt b/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt index c2204a56..0ba78623 100644 --- a/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt +++ b/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt @@ -55,14 +55,12 @@ class VSSPropertiesViewModel : ViewModel() { Field.FIELD_METADATA, ) - private var _suggestions: Collection by mutableStateOf(listOf()) - val suggestions - get() = _suggestions + var suggestions: Set by mutableStateOf(setOf()) + private set val datapoint: Datapoint get() = vssProperties.valueType.createDatapoint(vssProperties.value) - // Meta data are always part of the properties val property: Property get() = Property(vssProperties.vssPath, listOf(vssProperties.fieldType)) @@ -71,10 +69,10 @@ class VSSPropertiesViewModel : ViewModel() { } fun updateSuggestions(vssPaths: Collection) { - this._suggestions = createVssPathHierarchy(vssPaths) + suggestions = generateVssPathHierarchy(vssPaths) } - private fun createVssPathHierarchy(paths: Collection): TreeSet { + private fun generateVssPathHierarchy(paths: Collection): TreeSet { val pathSet = TreeSet() paths.forEach {