Fix inventory recomposition

This commit is contained in:
Andres Gomez, Thomas (ITDV RL) 2025-02-12 13:16:01 +01:00
parent c11dc62a18
commit 8f45fe7a77
2 changed files with 1 additions and 7 deletions

View file

@ -170,7 +170,6 @@ fun InventoryPage(
}
}
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun InventoryContent(
modifier: Modifier = Modifier,
@ -248,7 +247,6 @@ private fun InventoryContent(
when (item) {
is String -> CategoryHeader(
modifier = Modifier
.animateItem()
.fillMaxWidth()
.padding(
start = 16.dp,

View file

@ -1,15 +1,12 @@
package com.pixelized.rplexicon.ui.screens.character.pages.inventory.composable.draggable
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.lazy.grid.LazyGridItemScope
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.graphicsLayer
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun LazyGridItemScope.DraggableInventoryElement(
fun DraggableInventoryElement(
modifier: Modifier = Modifier,
dragDropState: InventoryDragDropState,
index: Int,
@ -18,7 +15,6 @@ fun LazyGridItemScope.DraggableInventoryElement(
) {
Box(
modifier = Modifier
.animateItem()
.graphicsLayer {
dragDropState.draggedItemElement?.let { element ->
this.alpha = when {