Default game library to vertical covers (#1857)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-30 14:09:44 -04:00
1 parent 83980035c6
commit fa4a54f64a
3 files changed
+5 -4

No files matched your search

@@ -147,10 +147,10 @@ object SessionPrefs {
}
fun storesView(context: Context): String =
prefs(context).getString("storesView", null)?.takeIf { it in STORES_VIEWS } ?: STORES_VIEWS.first()
prefs(context).getString("storesView", null)?.takeIf { it in STORES_VIEWS } ?: DEFAULT_STORES_VIEW
fun setStoresView(context: Context, view: String) {
prefs(context).edit().putString("storesView", if (view in STORES_VIEWS) view else STORES_VIEWS.first()).apply()
prefs(context).edit().putString("storesView", if (view in STORES_VIEWS) view else DEFAULT_STORES_VIEW).apply()
}
fun libraryCardLevel(context: Context): Int = prefs(context).getInt("libraryCardLevel", 2)
@@ -199,6 +199,7 @@ object SessionPrefs {
val STORES_SORTS = listOf("lastPlayed", "recentlyInstalled", "titleAsc", "titleDesc", "sizeDesc", "sizeAsc", "releaseDateDesc")
val STORES_VIEWS = listOf("cards", "capsules", "list")
const val DEFAULT_STORES_VIEW = "capsules"
fun storesInstallTarget(context: Context): String = prefs(context).getString("storesInstallTarget", "") ?: ""