accompanist icon indicating copy to clipboard operation
accompanist copied to clipboard

[DrawablePainter] Use mutableStateOf(Unit, neverEqualPolicy()) / mutableIntStateOf to invalidate

Open FooIbar opened this issue 8 months ago • 0 comments

https://github.com/google/accompanist/blob/fda7f06a24a42b0b1afa75591e768d82d2941984/drawablepainter/src/main/java/com/google/accompanist/drawablepainter/DrawablePainter.kt#L59 Could be replaced with mutableStateOf(Unit, neverEqualPolicy()). Though according to this there is an internal bug which I can't tell if it's already addressed. If not, mutableIntStateOf can be used instead.

https://github.com/google/accompanist/blob/fda7f06a24a42b0b1afa75591e768d82d2941984/drawablepainter/src/main/java/com/google/accompanist/drawablepainter/DrawablePainter.kt#L60 Can also be replaced with mutableLongStateOf but I'm not sure if it's worth it.

FooIbar avatar Jun 27 '25 04:06 FooIbar