diff --git a/app/src/main/kotlin/org/eclipse/kuksa/testapp/preferences/ConnectionInfoRepository.kt b/app/src/main/kotlin/org/eclipse/kuksa/testapp/preferences/ConnectionInfoRepository.kt index 9ca2cae9..c2ef80d4 100644 --- a/app/src/main/kotlin/org/eclipse/kuksa/testapp/preferences/ConnectionInfoRepository.kt +++ b/app/src/main/kotlin/org/eclipse/kuksa/testapp/preferences/ConnectionInfoRepository.kt @@ -27,8 +27,6 @@ import org.eclipse.kuksa.testapp.databroker.model.ConnectionInfo import org.eclipse.kuksa.testapp.databroker.model.ConnectionInfoSerializer class ConnectionInfoRepository(context: Context) { - - private val Context.dataStore: DataStore by dataStore(PREFERENCES_NAME, ConnectionInfoSerializer) private val dataStore = context.dataStore val connectionInfoFlow: Flow = dataStore.data @@ -39,5 +37,9 @@ class ConnectionInfoRepository(context: Context) { private companion object { private const val PREFERENCES_NAME = "connection_info" + private val Context.dataStore: DataStore by dataStore( + PREFERENCES_NAME, + ConnectionInfoSerializer, + ) } }