Skip to content

Commit 917e88a

Browse files
committed
fix item animation
1 parent 562dd0b commit 917e88a

File tree

1 file changed

+4
-3
lines changed
  • components/filemngr/listing/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/listing/impl/composable

1 file changed

+4
-3
lines changed

components/filemngr/listing/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/listing/impl/composable/LoadedFilesComposable.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ fun LazyGridScope.LoadedFilesComposable(
4343
val isFileLoading = remember(deleteFileState.fileNamesOrNull) {
4444
deleteFileState.fileNamesOrNull.orEmpty().contains(file.itemName)
4545
}
46-
Crossfade(isFileLoading) { animatedIsFileLoading ->
46+
Crossfade(
47+
targetState = isFileLoading,
48+
modifier = Modifier.animateItem()
49+
) { animatedIsFileLoading ->
4750
if (animatedIsFileLoading) {
4851
FolderCardPlaceholderComposable(
4952
modifier = Modifier
5053
.fillMaxWidth()
51-
.animateItem()
5254
.animateContentSize(),
5355
orientation = orientation,
5456
)
@@ -64,7 +66,6 @@ fun LazyGridScope.LoadedFilesComposable(
6466
FolderCardComposable(
6567
modifier = Modifier
6668
.fillMaxWidth()
67-
.animateItem()
6869
.animateContentSize(),
6970
painter = file.asListingItem().asPainter(),
7071
iconTint = file.asListingItem().asTint(),

0 commit comments

Comments
 (0)