You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SuspiciousModifierThen",
"Using Modifier.then with a Modifier factory function with an implicit receiver",
"Calling a Modifier factory function with an implicit receiver inside " +
"Modifier.then will result in the receiver (`this`) being added twice to the " +
"chain. For example, fun Modifier.myModifier() = this.then(otherModifier()) - " +
"the implementation of factory functions such as Modifier.otherModifier() will " +
"internally call this.then(...) to chain the provided modifier with their " +
"implementation. When you expand this.then(otherModifier()), it becomes: " +
"this.then(this.then(OtherModifierImplementation)) - so you can see that `this` " +
"is included twice in the chain, which results in modifiers such as padding " +
"being applied twice, for example. Instead, you should either remove the then() " +
"and directly chain the factory function on the receiver, this.otherModifier(), " +
"or add the empty Modifier as the receiver for the factory, such as " +
"this.then(Modifier.otherModifier())",
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/SuspiciousModifierThenDetector.kt;l=109-132
The text was updated successfully, but these errors were encountered: