Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
yamin8000 committed Sep 10, 2024
1 parent d86a928 commit b004422
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,13 @@ private fun GameBoard(
) {
val screenWidth = LocalConfiguration.current.screenWidthDp.dp
val boxPadding = 16.dp
val boxSize = screenWidth - (2 * boxPadding.value).dp
val boxSize = remember(screenWidth) {
screenWidth - (2 * boxPadding.value).dp
}
val itemMargin = 8.dp
val boxItemSize = ((boxSize.value - itemMargin.value * (gameSize - 1)) / gameSize).dp
val boxItemSize = remember(boxSize) {
((boxSize.value - itemMargin.value * (gameSize - 1)) / gameSize).dp
}

LazyVerticalGrid(
modifier = Modifier.size(boxSize),
Expand Down

0 comments on commit b004422

Please sign in to comment.