feat(preferences): add preference to auto-expand screenshots in app details

This commit is contained in:
Michatec committed 2026-07-05 20:30:39 +02:00
1 parent 2d9263ed18
commit a88d7fd8a6
6 files changed
+9 -1

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -88,6 +88,7 @@ object Preferences {
sealed class Key<T>(val name: String, val default: Value<T>) {
object AutoSync: Key<Preferences.AutoSync>("auto_sync", Value.EnumerationValue(Preferences.AutoSync.Wifi))
object ExpandScreenshots: Key<Boolean>("expand_screenshots", Value.BooleanValue(true))
object IncompatibleVersions: Key<Boolean>("incompatible_versions", Value.BooleanValue(false))
object ProxyHost: Key<String>("proxy_host", Value.StringValue("localhost"))
object ProxyPort: Key<Int>("proxy_port", Value.IntValue(9050))
@@ -85,6 +85,8 @@ class PreferencesFragment: ScreenFragment() {
}
addSwitch(Preferences.Key.IncompatibleVersions, getString(R.string.incompatible_versions),
getString(R.string.incompatible_versions_summary))
addSwitch(Preferences.Key.ExpandScreenshots, getString(R.string.expand_screenshots),
getString(R.string.expand_screenshots_summary))
}
preferencesLayout.addCategory("Credits") {
val texts = 16f
@@ -593,7 +593,8 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
}
private val items = mutableListOf<Item>()
private val expanded = mutableSetOf<ExpandType>()
private val expanded = if (Preferences[Preferences.Key.ExpandScreenshots])
mutableSetOf(ExpandType.SCREENSHOTS) else mutableSetOf<ExpandType>()
private var product: Product? = null
private var installedItem: InstalledItem? = null
+2
View File
@@ -38,6 +38,8 @@
<string name="downloading">Wird heruntergeladen</string>
<string name="downloading_FORMAT">Lade %s herunter</string>
<string name="edit_repository">Repository bearbeiten</string>
<string name="expand_screenshots">Screenshots automatisch ausklappen</string>
<string name="expand_screenshots_summary">Screenshots in den App-Details automatisch anzeigen</string>
<string name="file_format_error_DESC">Ungültiges Dateiformat.</string>
<string name="fingerprint">Fingerabdruck</string>
<string name="has_advertising">Enthält Werbung</string>
+2
View File
@@ -39,6 +39,8 @@
<string name="downloading">Downloading</string>
<string name="downloading_FORMAT">Downloading %s</string>
<string name="edit_repository">Edit repository</string>
<string name="expand_screenshots">Expand screenshots</string>
<string name="expand_screenshots_summary">Automatically expand screenshots in app details</string>
<string name="file_format_error_DESC">Invalid file format.</string>
<string name="fingerprint">Fingerprint</string>
<string name="has_advertising">Has advertising</string>