Luke Carpenter
10/27/2023, 10:00 AMlast
on the flow blocks the app, and collectLatest
gives me a closure not a return value, so I’m a little confused on what I do 😵💫 😵Luke Carpenter
10/27/2023, 10:00 AMLuke Carpenter
10/27/2023, 10:37 AMinit
specifically to copy from the flow to an instance variable on the API client:Luke Carpenter
10/27/2023, 10:38 AMinit {
scope.launch {
apiPreferencesDataSource.apiData.collect { apiData ->
Log.d("PartScanClient", "[INIT] getConfig: apiData='$apiData'")
this@PartScanClient.token = apiData.token
}
}
}
not confident this is the recommended way to get this done, but, it works