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
I have a project where there are items in a LazyColumn in a kind of hierarchical directory/file structure.
My problem arises when I try to factor out some of the code into a new composable function and handle the reordering code within that funtion. As soon as I do that, I get IOOB crashes when reordering.
I tried to strip it down to a demo to get my point across:
In this example, the first items you see are the 5 top level items (Dir1, Dir2, Item1, Item2, Item3). When you click on a directory, the child items are displayed instead. When you now try to reorder an item with index >= 5, you get an IOOB Exception.
My guess, like the title says, is that the onMove lambda is cached and the action is performed on the old list. In other word, even if orderedItems changes, the onMove lambda doesn't.
The text was updated successfully, but these errors were encountered:
Hi!
I have a project where there are items in a LazyColumn in a kind of hierarchical directory/file structure.
My problem arises when I try to factor out some of the code into a new composable function and handle the reordering code within that funtion. As soon as I do that, I get IOOB crashes when reordering.
I tried to strip it down to a demo to get my point across:
In this example, the first items you see are the 5 top level items (Dir1, Dir2, Item1, Item2, Item3). When you click on a directory, the child items are displayed instead. When you now try to reorder an item with index >= 5, you get an IOOB Exception.
My guess, like the title says, is that the
onMove
lambda is cached and the action is performed on the old list. In other word, even iforderedItems
changes, theonMove
lambda doesn't.The text was updated successfully, but these errors were encountered: