Find if (x) Modifier.foo() else Modifier patterns
Proprietaryif (cond) Modifier.foo() else Modifier returns two structurally different Modifier chains, breaking memoization on the consumer. Use Modifier.then(if (cond) Modifier.foo() else Modifier) or Modifier.composed { if (cond) padding(8.dp) else this } so the consumer sees a single stable reference.
org. openrewrite. kotlin. compose. FindConditionalModifier$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. compose. FindConditionalModifier$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.