Skip to content

Commit

Permalink
pause detail
Browse files Browse the repository at this point in the history
  • Loading branch information
bqv committed Oct 7, 2023
1 parent a031db9 commit 1f740cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,16 @@ fun LargeGameItem(game: Game, boardTheme: BoardTheme, userId: Long, onAction: (A
fontSize = 12.sp,
)
if (game.pauseControl.isPaused()) {
val paused = when {
game.pauseControl?.vacationWhite == true -> "vacation (white)"
game.pauseControl?.vacationBlack == true -> "vacation (black)"
game.pauseControl?.weekend == true -> "weekend"
game.pauseControl?.stoneRemoval == true -> "scoring"
game.pauseControl?.server == true -> "paused (server)"
else -> "paused"
}
Text(
text = " · paused",
text = " · $paused",
style = TextStyle.Default.copy(
fontSize = 12.sp,
),
Expand Down Expand Up @@ -128,4 +136,4 @@ private fun Preview() {
onAction = {}
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,16 @@ fun SmallGameItem(game: Game, boardTheme: BoardTheme, userId: Long, onAction: (A
),
)
if (game.pauseControl.isPaused()) {
val paused = when {
game.pauseControl?.vacationWhite == true -> "vacation (white)"
game.pauseControl?.vacationBlack == true -> "vacation (black)"
game.pauseControl?.weekend == true -> "weekend"
game.pauseControl?.stoneRemoval == true -> "scoring"
game.pauseControl?.server == true -> "paused (server)"
else -> "paused"
}
Text(
text = " · paused",
text = " · $paused",
color = MaterialTheme.colors.onSurface,
style = TextStyle.Default.copy(
fontSize = 12.sp,
Expand Down

0 comments on commit 1f740cf

Please sign in to comment.