Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ dependencies {
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.lifecycle.runtime.compose)
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import androidx.compose.ui.input.key.type
import dev.johnoreilly.wordmaster.shared.LetterStatus
import dev.johnoreilly.wordmaster.shared.WordMasterService
import dev.johnoreilly.wordmaster.androidApp.theme.WordMasterTheme
import androidx.lifecycle.compose.collectAsStateWithLifecycle


class MainActivity : ComponentActivity() {
Expand Down Expand Up @@ -80,10 +81,10 @@ fun WordMasterView(padding: Modifier) {
WordMasterService(wordsPath)
}

val boardGuesses by wordMasterService.boardGuesses.collectAsState()
val boardStatus by wordMasterService.boardStatus.collectAsState()
val revealedAnswer by wordMasterService.revealedAnswer.collectAsState()
val lastGuessCorrect by wordMasterService.lastGuessCorrect.collectAsState()
val boardGuesses by wordMasterService.boardGuesses.collectAsStateWithLifecycle()
val boardStatus by wordMasterService.boardStatus.collectAsStateWithLifecycle()
val revealedAnswer by wordMasterService.revealedAnswer.collectAsStateWithLifecycle()
val lastGuessCorrect by wordMasterService.lastGuessCorrect.collectAsStateWithLifecycle()

val focusManager = LocalFocusManager.current
// FocusRequesters for every cell to enable precise intra-row navigation (e.g., Backspace behavior)
Expand Down
1 change: 0 additions & 1 deletion compose-desktop/src/main/kotlin/main.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ compose-plugin = "1.8.2"
kmp-nativecoroutines = "1.0.0-ALPHA-45"
okio = "3.16.0"
junit = "4.13.2"
androidxLifecycle = "2.8.6"

[libraries]
junit = { module = "junit:junit", version.ref = "junit" }
Expand All @@ -28,6 +29,7 @@ androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "androidxLifecycle" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }


Expand Down
Loading