Skip to content

Commit

Permalink
GamePage: 优化代码逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
purofle committed Jan 2, 2024
1 parent 672fa58 commit d0985fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/github/purofle/nmsl/pages/GamePage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.runtime.snapshots.SnapshotStateList
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
Expand All @@ -34,7 +35,6 @@ class GamePage : Page {

var searchGameText by remember { mutableStateOf("") }
var selectedGame by remember { mutableStateOf("") }
val gameList = remember { mutableStateListOf<String>() }
var showMicrosoftLoginDialog by remember { mutableStateOf(false) }

val snackbarHostState = remember { SnackbarHostState() }
Expand All @@ -45,7 +45,7 @@ class GamePage : Page {
}

val scope = rememberCoroutineScope()
gameList.addAll(GameManager.versions)
val gameList: SnapshotStateList<String> = GameManager.versions.toMutableStateList()

if (showMicrosoftLoginDialog) {
MicrosoftLoginDialog({
Expand Down

0 comments on commit d0985fc

Please sign in to comment.