Open Ilya-Gh opened 1 year ago
Can you please paste the error or screenshot?
@ZacSweers Sorry for not stating it clear enough. The issue is that the ComposeViewModelForwarding rule does not report the error when it should.
The case:
@Composable
fun ComposableFalseNegative(
viewModel: ViewModel,
modifier: Modifier = Modifier
) {
Row {
ComposableWithViewModel(viewModel = viewModel)
}
}
Could be the ViewModel logic since this approach makes it hard to reuse or replace it some cases
The following codes report the error(as expected):
In the following screnario, the rule fails to detect the issue when the viewModel is transferred between Composable layers, leading to a false-negative: