Open RicardasBivainis opened 2 weeks ago
What's the version of compose in your project and which version of this library are you using?
It's your demo project:
activityCompose = "1.9.3" agp = "8.3.2" compose = "1.7.0" kotlin = "2.0.0" mavenPublish = "0.29.0" precompose = "1.6.1" uiTooling = "1.7.5"
group = "sh.calvin.reorderable" version = "2.4.0"
It seems that the main thing is the size (or maybe zoom(display item size maximization))
Hmm I'll take a look. I thought it was solved already
Sorry last issue that I opened just did not have time at that moment to provide more information. My bad.
Hey, did you managed to reproduce the issues? Any update?
It's a busy week. I'll try to take a deeper look soon. It's not immediately obvious in the code what's wrong.
We got the same issue. Happens also with the sample project, if you do this:
package sh.calvin.reorderable.demo
data class Item(val id: Int, val text: String, val size: Int)
val items = (0..200).map {
Item(id = it, text = "Item #$it", size = if (it % 2 == 0) 70 else if(it == 15) 1000 else 100)
}
Debugged it a big, it seems like in fun Modifier.draggable for some reason the DisposableEffect is called and then everything is getting cleared. Maybe some behavior changes in the new compose version?
Did you maybe get some insights @Calvin-LL?
So the problem is the dragging item's actual position on the list can't be moved off screen. Once it's moved off screen, LazyColumn disposes it. I had something in the stroller to make sure a dragging item is never scrolled off screen but I'm not sure why it's not working. I'll have to wait till I have a free day to take a deeper look. Feel free to dig into it and see if you can solve it.
So this issue post compose update to 1.7.0. When trying to drag large items somehow it releases automaticly and drops randomly.
In video I use:
I used other resolutions for testing and the same bug appears.
Screen_recording_20241106_080151.webm
Screen_recording_20241106_080015.webm