mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
fix: SteamGridDB lookups no longer stick as "no match" after a failure; add a search to the art chooser (#876)
This commit is contained in:
1 parent
7c73adb3aa
commit
8874276458
6 files changed
+340
-26
No files matched your search
@@ -36,6 +36,10 @@ object AddedGameArt {
|
||||
|
||||
class Option(val group: String, val thumb: String, val full: String)
|
||||
|
||||
class Choices(val options: List<Option>, val sgdb: SteamGridDb.Status)
|
||||
|
||||
class Found<T>(val items: List<T>, val status: SteamGridDb.Status)
|
||||
|
||||
private val CHOSEN = Regex("""chosen-(\w+)\.(\w+)""")
|
||||
|
||||
private fun chosen(cache: File, slot: Slot): File? =
|
||||
@@ -108,7 +112,7 @@ object AddedGameArt {
|
||||
dir.listFiles { f -> f.isFile && f.extension.lowercase() in CHOOSABLE }?.sortedBy { it.name.lowercase() }.orEmpty()
|
||||
}.take(12)
|
||||
|
||||
fun options(context: Context, game: AddedGames.Game, slot: Slot): List<Option> {
|
||||
fun choices(context: Context, game: AddedGames.Game, slot: Slot): Choices {
|
||||
val out = ArrayList<Option>()
|
||||
folderImages(game.folder).forEach { out.add(Option(FOLDER, it.path, it.path)) }
|
||||
val cache = cacheDir(context, game)
|
||||
@@ -118,16 +122,42 @@ object AddedGameArt {
|
||||
val url = "$CDN$steamId/$remote".takeIf { exists(it) } ?: steamAssetUrl(steamId, remote)
|
||||
if (url != null) out.add(Option(STEAM, url, url))
|
||||
}
|
||||
var status = SteamGridDb.Status.OK
|
||||
val key = SteamGridDb.key(context)
|
||||
if (key.isNotEmpty()) {
|
||||
if (key.isEmpty()) {
|
||||
status = SteamGridDb.Status.NO_KEY
|
||||
} else {
|
||||
cache.mkdirs()
|
||||
val gridId = remembered(File(cache, "sgdb-id")) {
|
||||
runCatching { SteamGridDb.gameId(key, steamId?.toIntOrNull(), game.name) }.getOrNull()?.toString()
|
||||
}?.toIntOrNull()
|
||||
if (gridId != null) runCatching { SteamGridDb.images(key, gridId, slot, if (slot == Slot.ICON) 3 else 5) }.getOrNull()
|
||||
?.forEach { (thumb, full) -> out.add(Option(SGDB, thumb, full)) }
|
||||
try {
|
||||
val gridId = remembered(File(cache, "sgdb-id"), SteamGridDb.keyChangedAt(context), retryMiss = true) {
|
||||
SteamGridDb.gameId(key, steamId?.toIntOrNull(), game.name)?.toString()
|
||||
}?.toIntOrNull()
|
||||
if (gridId == null) status = SteamGridDb.Status.NO_GAME
|
||||
else SteamGridDb.images(key, gridId, slot, if (slot == Slot.ICON) 3 else 5)
|
||||
.forEach { (thumb, full) -> out.add(Option(SGDB, thumb, full)) }
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "${game.name}: SteamGridDB failed (${e.javaClass.simpleName})")
|
||||
status = (e as? SteamGridDb.Failed)?.status ?: SteamGridDb.Status.SERVER
|
||||
}
|
||||
}
|
||||
return Choices(out, status)
|
||||
}
|
||||
|
||||
fun searchGames(context: Context, term: String): Found<SteamGridDb.Game> = sgdb(context) { SteamGridDb.search(it, term) }
|
||||
|
||||
fun gameImages(context: Context, id: Int, slot: Slot, page: Int): Found<Option> = sgdb(context) { key ->
|
||||
SteamGridDb.page(key, id, slot, page).map { (thumb, full) -> Option(SGDB, thumb, full) }
|
||||
}
|
||||
|
||||
private fun <T> sgdb(context: Context, call: (String) -> List<T>): Found<T> {
|
||||
val key = SteamGridDb.key(context)
|
||||
if (key.isEmpty()) return Found(emptyList(), SteamGridDb.Status.NO_KEY)
|
||||
return try {
|
||||
Found(call(key), SteamGridDb.Status.OK)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "SteamGridDB: ${e.javaClass.simpleName}")
|
||||
Found(emptyList(), (e as? SteamGridDb.Failed)?.status ?: SteamGridDb.Status.SERVER)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
fun choose(context: Context, game: AddedGames.Game, slot: Slot, option: Option): Boolean {
|
||||
@@ -180,6 +210,8 @@ object AddedGameArt {
|
||||
fun fetchMissing(context: Context, games: List<AddedGames.Game>): Boolean {
|
||||
if (!SessionPrefs.addedGamesArt(context)) return false
|
||||
val sgdbKey = SteamGridDb.key(context)
|
||||
val keyChangedAt = SteamGridDb.keyChangedAt(context)
|
||||
var sgdbDown = false
|
||||
var changed = false
|
||||
for (game in games) {
|
||||
if (local(game).portrait != null) continue
|
||||
@@ -192,11 +224,24 @@ object AddedGameArt {
|
||||
val appId = match.appId?.takeIf { match.certainty == SteamMatch.Certainty.FILES }
|
||||
val id = match.appId?.toString()
|
||||
if (id != null && download(id, cache)) changed = true
|
||||
if (File(cache, "p.jpg").isFile || sgdbKey.isEmpty()) continue
|
||||
val gridId = remembered(File(cache, "sgdb-id")) {
|
||||
runCatching { SteamGridDb.gameId(sgdbKey, appId ?: id?.toIntOrNull(), game.name) }.getOrNull()?.toString()
|
||||
}?.toIntOrNull() ?: continue
|
||||
if (runCatching { SteamGridDb.download(sgdbKey, gridId, cache) }.getOrDefault(false)) changed = true
|
||||
if (File(cache, "p.jpg").isFile || sgdbKey.isEmpty() || sgdbDown) continue
|
||||
val stored: String? = try {
|
||||
remembered(File(cache, "sgdb-id"), keyChangedAt) {
|
||||
SteamGridDb.gameId(sgdbKey, appId ?: id?.toIntOrNull(), game.name)?.toString()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "${game.name}: SteamGridDB lookup failed (${e.javaClass.simpleName}); not asking again this pass")
|
||||
sgdbDown = true
|
||||
null
|
||||
}
|
||||
val gridId = stored?.toIntOrNull() ?: continue
|
||||
val grabbed = try {
|
||||
SteamGridDb.download(sgdbKey, gridId, cache)
|
||||
} catch (e: Exception) {
|
||||
sgdbDown = true
|
||||
false
|
||||
}
|
||||
if (grabbed) changed = true
|
||||
}
|
||||
return changed
|
||||
}
|
||||
@@ -207,11 +252,12 @@ object AddedGameArt {
|
||||
return match
|
||||
}
|
||||
|
||||
private fun remembered(marker: File, find: () -> String?): String? {
|
||||
internal fun remembered(marker: File, notBefore: Long = 0L, retryMiss: Boolean = false, find: () -> String?): String? {
|
||||
if (marker.isFile) {
|
||||
val value = marker.readText().trim()
|
||||
if (value != "none") return value
|
||||
if (System.currentTimeMillis() - marker.lastModified() < RETRY_AFTER_MS) return null
|
||||
val at = marker.lastModified()
|
||||
if (!retryMiss && at >= notBefore && System.currentTimeMillis() - at < RETRY_AFTER_MS) return null
|
||||
}
|
||||
val found = find()
|
||||
marker.writeText(found ?: "none")
|
||||
|
||||
@@ -16,6 +16,12 @@ object SteamGridDb {
|
||||
private const val API = "https://www.steamgriddb.com/api/v2"
|
||||
private const val QUERY = "nsfw=false&humor=false"
|
||||
|
||||
enum class Status { OK, NO_KEY, BAD_KEY, LIMIT, OFFLINE, SERVER, NO_GAME }
|
||||
|
||||
class Failed(val status: Status) : Exception(status.name)
|
||||
|
||||
class Game(val id: Int, val name: String, val verified: Boolean)
|
||||
|
||||
@VisibleForTesting
|
||||
@Volatile
|
||||
internal var keys: CredentialCipher.KeyProvider = CredentialCipher.Keystore
|
||||
@@ -30,6 +36,8 @@ object SteamGridDb {
|
||||
|
||||
fun key(context: Context): String = pick(userKey(context), builtInKey())
|
||||
|
||||
fun keyChangedAt(context: Context): Long = keyFile(context).lastModified()
|
||||
|
||||
@Synchronized
|
||||
fun userKey(context: Context): String {
|
||||
val f = keyFile(context)
|
||||
@@ -97,17 +105,37 @@ object SteamGridDb {
|
||||
return got
|
||||
}
|
||||
|
||||
fun images(key: String, id: Int, slot: AddedGameArt.Slot, limit: Int): List<Pair<String, String>> {
|
||||
val path = when (slot) {
|
||||
fun search(key: String, term: String): List<Game> {
|
||||
val q = term.trim()
|
||||
if (q.isEmpty()) return emptyList()
|
||||
val enc = URLEncoder.encode(q, "UTF-8").replace("+", "%20")
|
||||
val data = json(key, "$API/search/autocomplete/$enc")?.optJSONArray("data") ?: return emptyList()
|
||||
return games(data)
|
||||
}
|
||||
|
||||
internal fun games(data: JSONArray): List<Game> =
|
||||
(0 until data.length()).mapNotNull { data.optJSONObject(it) }
|
||||
.filter { it.optInt("id") > 0 && it.optString("name").isNotEmpty() }
|
||||
.map { Game(it.optInt("id"), it.optString("name"), it.optBoolean("verified")) }
|
||||
|
||||
internal fun path(id: Int, slot: AddedGameArt.Slot, page: Int): String {
|
||||
val base = when (slot) {
|
||||
AddedGameArt.Slot.COVER -> "grids/game/$id?dimensions=600x900&$QUERY"
|
||||
AddedGameArt.Slot.BACKGROUND -> "heroes/game/$id?$QUERY"
|
||||
AddedGameArt.Slot.LOGO -> "logos/game/$id?$QUERY"
|
||||
AddedGameArt.Slot.ICON -> "icons/game/$id?$QUERY"
|
||||
}
|
||||
val items = json(key, "$API/$path")?.optJSONArray("data") ?: return emptyList()
|
||||
return ranked(items, pngOnly = slot == AddedGameArt.Slot.LOGO || slot == AddedGameArt.Slot.ICON).take(limit)
|
||||
return if (page > 0) "$base&page=$page" else base
|
||||
}
|
||||
|
||||
fun page(key: String, id: Int, slot: AddedGameArt.Slot, page: Int): List<Pair<String, String>> {
|
||||
val items = json(key, "$API/${path(id, slot, page)}")?.optJSONArray("data") ?: return emptyList()
|
||||
return ranked(items, pngOnly = slot == AddedGameArt.Slot.LOGO || slot == AddedGameArt.Slot.ICON)
|
||||
}
|
||||
|
||||
fun images(key: String, id: Int, slot: AddedGameArt.Slot, limit: Int): List<Pair<String, String>> =
|
||||
page(key, id, slot, 0).take(limit)
|
||||
|
||||
internal fun ranked(items: JSONArray, pngOnly: Boolean): List<Pair<String, String>> =
|
||||
(0 until items.length()).map { items.getJSONObject(it) }
|
||||
.filter { it.optString("url").startsWith("https://") && (!pngOnly || it.optString("mime") == "image/png" || it.optString("url").endsWith(".png", true)) }
|
||||
@@ -119,6 +147,13 @@ object SteamGridDb {
|
||||
.filter { it.optString("url").startsWith("https://") && (!pngOnly || it.optString("mime") == "image/png" || it.optString("url").endsWith(".png", true)) }
|
||||
.maxByOrNull { it.optInt("score", 0) }?.optString("url")
|
||||
|
||||
internal fun failure(code: Int): Status? = when {
|
||||
code == 401 || code == 403 -> Status.BAD_KEY
|
||||
code == 429 -> Status.LIMIT
|
||||
code >= 500 -> Status.SERVER
|
||||
else -> null
|
||||
}
|
||||
|
||||
private fun json(key: String, url: String): JSONObject? {
|
||||
val c = URL(url).openConnection() as HttpURLConnection
|
||||
c.connectTimeout = 10_000
|
||||
@@ -126,8 +161,19 @@ object SteamGridDb {
|
||||
c.setRequestProperty("User-Agent", "DroidDeck-launcher")
|
||||
c.setRequestProperty("Authorization", "Bearer $key")
|
||||
return try {
|
||||
if (c.responseCode != 200) { Log.w(TAG, "${URL(url).path}: HTTP ${c.responseCode}"); null }
|
||||
else JSONObject(c.inputStream.use { it.readBytes() }.toString(Charsets.UTF_8)).takeIf { it.optBoolean("success", true) }
|
||||
val code = c.responseCode
|
||||
if (code == 200) {
|
||||
JSONObject(c.inputStream.use { it.readBytes() }.toString(Charsets.UTF_8)).takeIf { it.optBoolean("success", true) }
|
||||
} else {
|
||||
Log.w(TAG, "${URL(url).path}: HTTP $code")
|
||||
failure(code)?.let { throw Failed(it) }
|
||||
null
|
||||
}
|
||||
} catch (e: Failed) {
|
||||
throw e
|
||||
} catch (e: java.io.IOException) {
|
||||
Log.w(TAG, "${URL(url).path}: ${e.javaClass.simpleName}")
|
||||
throw Failed(Status.OFFLINE)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "${URL(url).path}: ${e.javaClass.simpleName}"); null
|
||||
} finally {
|
||||
|
||||
@@ -22,6 +22,7 @@ import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Close
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.outlined.Image
|
||||
import androidx.compose.material.icons.outlined.Search
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -56,6 +57,7 @@ import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.AddedGameArt
|
||||
import com.droiddeck.launcher.frontend.AddedGameEdits
|
||||
import com.droiddeck.launcher.frontend.AddedGames
|
||||
import com.droiddeck.launcher.frontend.SteamGridDb
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -356,9 +358,15 @@ private fun ArtChooserDialog(
|
||||
val shown = rememberShown(onBack)
|
||||
val back = { shown.targetState = false }
|
||||
var options by remember { mutableStateOf<List<AddedGameArt.Option>?>(null) }
|
||||
var sgdb by remember { mutableStateOf(SteamGridDb.Status.OK) }
|
||||
var picking by remember { mutableStateOf(false) }
|
||||
var searching by remember { mutableStateOf(false) }
|
||||
val chosenRef = remember(current) { AddedGameArt.chosenSource(app, game, slot).second }
|
||||
LaunchedEffect(slot) { options = withContext(Dispatchers.IO) { runCatching { AddedGameArt.options(app, game, slot) }.getOrDefault(emptyList()) } }
|
||||
LaunchedEffect(slot) {
|
||||
val found = withContext(Dispatchers.IO) { runCatching { AddedGameArt.choices(app, game, slot) }.getOrNull() }
|
||||
options = found?.options ?: emptyList()
|
||||
sgdb = found?.sgdb ?: SteamGridDb.Status.SERVER
|
||||
}
|
||||
val first = remember { FocusRequester() }
|
||||
LaunchedEffect(Unit) { focusWithinFrames({ false }) { first } }
|
||||
val apply: (AddedGameArt.Option) -> Unit = { option ->
|
||||
@@ -394,7 +402,9 @@ private fun ArtChooserDialog(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sgdb != SteamGridDb.Status.OK) SgdbNote(sgdb)
|
||||
}
|
||||
PickerRow(Icons.Outlined.Search, stringResource(R.string.art_search_sgdb), null) { searching = true }
|
||||
PickerRow(Icons.Outlined.Image, stringResource(R.string.art_pick_image), null, focus = if (opts?.isEmpty() != false) first else null) { picking = true }
|
||||
PickerRow(null, stringResource(R.string.art_reset), null) {
|
||||
scope.launch {
|
||||
@@ -408,6 +418,136 @@ private fun ArtChooserDialog(
|
||||
if (picking) ExePickerDialog(stringResource(R.string.art_pick_title, slotName), kind = PickKind.IMAGE, onDismiss = { picking = false }, onPick = { file ->
|
||||
apply(AddedGameArt.Option(AddedGameArt.FILE, file.path, file.path))
|
||||
})
|
||||
if (searching) SgdbSearchDialog(
|
||||
game, slot, current,
|
||||
onBack = { searching = false }, onCloseAll = { searching = false; onCloseAll() }, onPick = apply,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun SgdbNote(status: SteamGridDb.Status) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val quiet = status == SteamGridDb.Status.NO_KEY || status == SteamGridDb.Status.NO_GAME
|
||||
Text(
|
||||
stringResource(
|
||||
when (status) {
|
||||
SteamGridDb.Status.NO_KEY -> R.string.art_sgdb_no_key
|
||||
SteamGridDb.Status.BAD_KEY -> R.string.art_sgdb_bad_key
|
||||
SteamGridDb.Status.LIMIT -> R.string.art_sgdb_limit
|
||||
SteamGridDb.Status.OFFLINE -> R.string.art_sgdb_offline
|
||||
SteamGridDb.Status.NO_GAME -> R.string.art_sgdb_no_game
|
||||
else -> R.string.art_sgdb_server
|
||||
},
|
||||
),
|
||||
fontSize = 12.sp, color = if (quiet) colors.onSurfaceVariant else colors.error, modifier = Modifier.padding(start = 2.dp, top = 4.dp),
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
private fun SgdbSearchDialog(
|
||||
game: AddedGames.Game, slot: AddedGameArt.Slot, current: AddedGameArt.SlotState?,
|
||||
onBack: () -> Unit, onCloseAll: () -> Unit, onPick: (AddedGameArt.Option) -> Unit,
|
||||
) {
|
||||
val app = LocalContext.current.applicationContext
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val scope = rememberCoroutineScope()
|
||||
val shown = rememberShown(onBack)
|
||||
val back = { shown.targetState = false }
|
||||
var query by remember { mutableStateOf(game.name) }
|
||||
var matches by remember { mutableStateOf<List<SteamGridDb.Game>?>(null) }
|
||||
var picked by remember { mutableStateOf<SteamGridDb.Game?>(null) }
|
||||
var images by remember { mutableStateOf<List<AddedGameArt.Option>>(emptyList()) }
|
||||
var page by remember { mutableIntStateOf(0) }
|
||||
var more by remember { mutableStateOf(false) }
|
||||
var busy by remember { mutableStateOf(true) }
|
||||
var status by remember { mutableStateOf(SteamGridDb.Status.OK) }
|
||||
val chosenRef = remember(current) { AddedGameArt.chosenSource(app, game, slot).second }
|
||||
val slotName = slot.label()
|
||||
val showImages: (SteamGridDb.Game) -> Unit = { found ->
|
||||
scope.launch {
|
||||
picked = found
|
||||
images = emptyList()
|
||||
page = 0
|
||||
more = false
|
||||
busy = true
|
||||
status = SteamGridDb.Status.OK
|
||||
val result = withContext(Dispatchers.IO) { AddedGameArt.gameImages(app, found.id, slot, 0) }
|
||||
images = result.items
|
||||
status = result.status
|
||||
more = result.items.isNotEmpty()
|
||||
busy = false
|
||||
}
|
||||
}
|
||||
val search: () -> Unit = {
|
||||
scope.launch {
|
||||
busy = true
|
||||
picked = null
|
||||
status = SteamGridDb.Status.OK
|
||||
val result = withContext(Dispatchers.IO) { AddedGameArt.searchGames(app, query) }
|
||||
matches = result.items
|
||||
status = result.status
|
||||
busy = false
|
||||
val sure = result.items.firstOrNull { AddedGameArt.nameMatch(query, it.name) == 3 } ?: result.items.singleOrNull()
|
||||
if (sure != null) showImages(sure)
|
||||
}
|
||||
}
|
||||
val loadMore: () -> Unit = {
|
||||
val found = picked
|
||||
if (found != null && !busy) scope.launch {
|
||||
busy = true
|
||||
val result = withContext(Dispatchers.IO) { AddedGameArt.gameImages(app, found.id, slot, page + 1) }
|
||||
val fresh = result.items.filter { next -> images.none { it.full == next.full } }
|
||||
images = images + fresh
|
||||
page += 1
|
||||
more = fresh.isNotEmpty()
|
||||
if (result.status != SteamGridDb.Status.OK) status = result.status
|
||||
busy = false
|
||||
}
|
||||
}
|
||||
LaunchedEffect(Unit) { search() }
|
||||
AppDialog(shown, back, "sgdbSearch", wide = false, maxWidth = 460.dp) {
|
||||
DialogTitleRow(stringResource(R.string.art_sgdb_title, slotName), onClose = { onCloseAll() }, leading = {
|
||||
SmallIconButton(Icons.AutoMirrored.Filled.ArrowBack, stringResource(R.string.common_back), colors.onBackground, onClick = back)
|
||||
})
|
||||
androidx.compose.material3.OutlinedTextField(
|
||||
query, { query = it }, singleLine = true, modifier = Modifier.fillMaxWidth(),
|
||||
label = { Text(stringResource(R.string.art_sgdb_search_label)) },
|
||||
keyboardActions = androidx.compose.foundation.text.KeyboardActions(onSearch = { search() }),
|
||||
keyboardOptions = androidx.compose.foundation.text.KeyboardOptions(imeAction = androidx.compose.ui.text.input.ImeAction.Search),
|
||||
)
|
||||
val maxHeight = (LocalConfiguration.current.screenHeightDp * 0.6f).dp
|
||||
Column(
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
modifier = Modifier.fillMaxWidth().heightIn(max = maxHeight).verticalScroll(rememberScrollState()),
|
||||
) {
|
||||
if (status != SteamGridDb.Status.OK) SgdbNote(status)
|
||||
val chosenGame = picked
|
||||
val list = matches.orEmpty()
|
||||
if (chosenGame == null) {
|
||||
for (match in list) key(match.id) { PickerRow(null, match.name, null) { showImages(match) } }
|
||||
if (matches != null && list.isEmpty() && !busy && status == SteamGridDb.Status.OK) {
|
||||
Text(stringResource(R.string.art_sgdb_none), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp))
|
||||
}
|
||||
} else {
|
||||
Text(chosenGame.name, fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp))
|
||||
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
for (option in images) key(option.full) {
|
||||
ArtOption(
|
||||
slot, option, selected = current?.chosen == true && option.full == chosenRef, focus = null,
|
||||
description = "${artSourceLabel(AddedGameArt.SGDB)} $slotName",
|
||||
) { onPick(option) }
|
||||
}
|
||||
}
|
||||
if (images.isEmpty() && !busy && status == SteamGridDb.Status.OK) {
|
||||
Text(stringResource(R.string.art_sgdb_none), fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.padding(start = 2.dp, top = 4.dp))
|
||||
}
|
||||
if (more && !busy) PickerRow(null, stringResource(R.string.art_sgdb_more), null) { loadMore() }
|
||||
if (list.size > 1) PickerRow(null, stringResource(R.string.art_sgdb_other_games), null) { picked = null }
|
||||
}
|
||||
if (busy) androidx.compose.material3.LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 8.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
Reference in new issue
Block a user