Skip to content

Commit

Permalink
Shimmer effect fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RNicolasMarin committed Mar 19, 2024
1 parent ab07f8c commit 712de93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ fun CurrentRecord(
val shape = RoundedCornerShape(MaterialTheme.dimens.corners)
Box(modifier = modifier) {
if (isLoading) {
Box(modifier = Modifier.fillMaxSize().shimmerEffect(shape))
Box(modifier = modifier.shimmerEffect(shape))
} else {
Row(
horizontalArrangement = Arrangement.SpaceBetween,
modifier = Modifier
.fillMaxSize()
modifier = modifier
.background(
color = Green3,
shape = shape
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fun Modifier.shimmerEffect(shape: Shape = RectangleShape): Modifier = composed {
initialValue = -2 * size.width.toFloat(),
targetValue = 2 * size.width.toFloat(),
animationSpec = infiniteRepeatable(
animation = tween(1000)
animation = tween(800)
),
label = ""
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CreateBoardGameUseCase @Inject constructor(
boardGame = useCase.addNumber(boardGame)
boardGame = useCase.addNumber(boardGame)

delay(200)
delay(400)

val individualBestValues = repository.getIndividualBestValues(size) ?: IndividualBestValues()

Expand Down

0 comments on commit 712de93

Please sign in to comment.