Skip to content

Commit

Permalink
Update some depreciated stuffs
Browse files Browse the repository at this point in the history
Signed-off-by: starry-shivam <[email protected]>
  • Loading branch information
starry-shivam committed Sep 22, 2024
1 parent 2ecf275 commit 4b2e427
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import androidx.compose.animation.core.Transition
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.rememberTransition
import androidx.compose.animation.core.spring
import androidx.compose.animation.core.tween
import androidx.compose.animation.core.updateTransition
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -142,7 +142,7 @@ fun Modifier.placeholder(
val transitionState = remember { MutableTransitionState(visible) }.apply {
targetState = visible
}
val transition = updateTransition(transitionState, "placeholder_crossfade")
val transition = rememberTransition(transitionState, "placeholder_crossfade")

val placeholderAlpha by transition.animateFloat(
transitionSpec = placeholderFadeTransitionSpec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.compose.animation.core.keyframes
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
Expand Down Expand Up @@ -287,7 +286,6 @@ fun LibraryScreen(navController: NavController) {
}
}

@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun LibraryContents(
viewModel: LibraryViewModel,
Expand Down Expand Up @@ -341,7 +339,7 @@ private fun LibraryContents(
val item = libraryItems[i]
if (item.fileExist()) {
LibraryLazyItem(
modifier = Modifier.animateItemPlacement(),
modifier = Modifier.animateItem(fadeInSpec = null, fadeOutSpec = null),
item = item,
snackBarHostState = snackBarHostState,
navController = navController,
Expand Down

0 comments on commit 4b2e427

Please sign in to comment.