-
-
Notifications
You must be signed in to change notification settings - Fork 883
Conversation
It shouldn't be clickable if the text hasn't overflowed.
} else { | ||
Box(modifier = modifier) | ||
Box(modifier = modifier.onPositioned { childSize = it.size }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be nicer to do something like
var modifier = modifier.onPositioned { childSize = it.size }
if (image) {
...
modifier.paint(AndroidColorMatrixImagePainter(image, cf))
}
Box(modifier = modifier)
everytime you have if else blocks emitting different composables the previous Box should be completely disposed and the new Box recreated where in fact you can just update a modifier for the same Box
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done!
Thanks @andkulikov for the tip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Also managed to get rid of my dodgy onPositioned {} logic with `Modifier.matchParent()`
No description provided.