dave08
11/20/2022, 3:56 PM@SuppressLint("FlowOperatorInvokedInComposition")
for each of them? It seems to me that in the context of Molecule presenters there's no real problem in transforming/filtering flows... maybe there's a way for the library to suppress those warnings for it's functions somehow?hfhbd
11/20/2022, 3:59 PMcollectAsState
instead.dave08
11/20/2022, 4:00 PMval installState by applicationStatus
.filter { it.packageName == summary.packageName }
.flatMapLatest { it.progressFlow }
.collectAsState(initial = InstallState.None)
Gives me that errordave08
11/20/2022, 4:01 PMjw
11/20/2022, 4:02 PMdave08
11/20/2022, 4:04 PMComposable calls are not allowed inside the calculation parameter of inline fun <T> remember(crossinline calculation: () -> TypeVariable(T)): TypeVariable(T)
on collectAsStatejw
11/20/2022, 4:04 PMjw
11/20/2022, 4:04 PMjw
11/20/2022, 4:04 PMhfhbd
11/20/2022, 4:05 PMval installState by remember { applicationStatus
.filter { it.packageName == summary.packageName }
.flatMapLatest { it.progressFlow } }
.collectAsState(initial = InstallState.None)
dave08
11/20/2022, 4:05 PMdave08
11/20/2022, 4:07 PMViewModel
you don't usually need it, and in the docs, there's no mention of it.hfhbd
11/20/2022, 4:07 PMjw
11/20/2022, 4:07 PM