Unnecessary ?. / ?: / !! on non-null
Missing @OptIn annotations Parameter name mismatches Icons.Filled.* / Icons.AutoMirrored.* No cast needed / remove inline LocalLifecycleOwner import fix NIP-51 name() → title() Chess gameId → startEventId Nullable DecimalFormat safe calls DelicateCoroutinesApi opt-in
This commit is contained in:
+2
-2
@@ -237,7 +237,7 @@ fun LiveChessGameScreen(
|
||||
) {
|
||||
// Game info - use currentPosition.activeColor for turn display
|
||||
GameInfoHeader(
|
||||
gameId = gameState.gameId,
|
||||
gameId = gameState.startEventId,
|
||||
opponentName = opponentName,
|
||||
playerColor = gameState.playerColor,
|
||||
currentTurn = currentPosition.activeColor,
|
||||
@@ -463,7 +463,7 @@ private fun GameInfoHeader(
|
||||
// Show turn or game result
|
||||
when (gameStatus) {
|
||||
is GameStatus.Finished -> {
|
||||
val result = (gameStatus as GameStatus.Finished).result
|
||||
val result = gameStatus.result
|
||||
val resultText =
|
||||
when {
|
||||
result == GameResult.DRAW -> "Draw"
|
||||
|
||||
+4
-4
@@ -25,8 +25,8 @@ import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.KeyboardArrowLeft
|
||||
import androidx.compose.material.icons.filled.KeyboardArrowRight
|
||||
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowLeft
|
||||
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
|
||||
import androidx.compose.material.icons.filled.SkipNext
|
||||
import androidx.compose.material.icons.filled.SkipPrevious
|
||||
import androidx.compose.material3.Icon
|
||||
@@ -82,7 +82,7 @@ fun MoveNavigator(
|
||||
enabled = currentMove > 0,
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.KeyboardArrowLeft,
|
||||
Icons.AutoMirrored.Filled.KeyboardArrowLeft,
|
||||
contentDescription = "Previous move",
|
||||
tint =
|
||||
if (currentMove > 0) {
|
||||
@@ -106,7 +106,7 @@ fun MoveNavigator(
|
||||
enabled = currentMove < totalMoves,
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.KeyboardArrowRight,
|
||||
Icons.AutoMirrored.Filled.KeyboardArrowRight,
|
||||
contentDescription = "Next move",
|
||||
tint =
|
||||
if (currentMove < totalMoves) {
|
||||
|
||||
@@ -1027,7 +1027,7 @@ public inline fun <T> Iterable<Note>.filterEvents(predicate: (T) -> Boolean): Li
|
||||
return dest
|
||||
}
|
||||
|
||||
public inline fun <T> Iterable<Note>.filterAuthoredEvents(pubkey: HexKey): List<T> {
|
||||
public fun <T> Iterable<Note>.filterAuthoredEvents(pubkey: HexKey): List<T> {
|
||||
if (this is Collection && isEmpty()) return emptyList()
|
||||
|
||||
val dest = ArrayList<T>()
|
||||
|
||||
Reference in New Issue
Block a user