filipegoncalves
12/19/2024, 5:07 PMverticalArrangement = Bottom
, which is where the most recent message is. The problem is that the last message is always slightly cut (like around 24.dp below the input text to send messages on the bottom). Seems like the LazyColumn
calculates the space to scroll based on the message box original size, but then when the dynamic content is loaded and it expands, it doesn’t readjust.
I tried having a LaunchedEffect
and calculating the last item height (with onGloballyPositioned
modifier and scroll to the last item with that as offset
, the problem is that then it doesnt allow me to scroll back to the top 😅. I would have somehow to create a key that would be the combination of two key changes (& rule not or). I can fix this by locking this launched effect based on if there is already a scroll happening, but doesnt seem a good solution. Also everytime i write a message, it focuses on the 1st element of the list, instead of the last. Why ?
Does anyone have any idea how can i achieve this ?