mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Default game library to vertical covers (#1857)
This commit is contained in:
1 parent
83980035c6
commit
fa4a54f64a
3 files changed
+5
-4
No files matched your search
@@ -195,7 +195,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var navRequest by mutableStateOf<String?>(null)
|
||||
private var storesShowMature by mutableStateOf(false)
|
||||
private var storesSort by mutableStateOf(SessionPrefs.STORES_SORTS.first())
|
||||
private var storesView by mutableStateOf(SessionPrefs.STORES_VIEWS.first())
|
||||
private var storesView by mutableStateOf(SessionPrefs.DEFAULT_STORES_VIEW)
|
||||
private var mic by mutableStateOf(false)
|
||||
private var wifiDiscovery by mutableStateOf(false)
|
||||
private var wifiDiscoveryPermission by mutableStateOf(false)
|
||||
|
||||
@@ -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", "") ?: ""
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ class FrontEndState(
|
||||
val sgdbUserKey: Boolean = false,
|
||||
val storesShowMature: Boolean = false,
|
||||
val storesSort: String = SessionPrefs.STORES_SORTS.first(),
|
||||
val storesView: String = SessionPrefs.STORES_VIEWS.first(),
|
||||
val storesView: String = SessionPrefs.DEFAULT_STORES_VIEW,
|
||||
val storeDownloadsActive: Int = 0,
|
||||
val updates: UpdatesState = UpdatesState(),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user