Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from Mihon #1863

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3fbe1fa
Bump default user agent
AntsyLich Oct 31, 2024
bdb274f
Auto format extension repo URLs
Secozzi Jan 1, 2025
ee2c147
Fix a rare crash when invoking "Mark previous as read" action
Secozzi Jan 1, 2025
bd1f475
Fix long strip images not loading in some old devices
AntsyLich Oct 31, 2024
f3bd1b7
Address some build warnings and cleanup
AntsyLich Oct 31, 2024
aadfe54
Translations update from Hosted Weblate (#1111)
weblate Oct 31, 2024
fc0cf87
Update organization name in readme license snippet
AntsyLich Nov 2, 2024
8bb03eb
Add option to always use SSIV for image decoding
AntsyLich Nov 2, 2024
56b3976
Cleanup some code
Secozzi Jan 1, 2025
7b55b58
Update xml.serialization.version to v0.90.3 (#1446)
renovate-bot Nov 5, 2024
dbef297
Update dependency io.coil-kt.coil3:coil-bom to v3.0.0 (#1444)
renovate-bot Nov 5, 2024
fe1d030
Update softprops/action-gh-release action to v2.0.9 (#1425)
renovate-bot Nov 5, 2024
8892db8
Update dependency com.android.tools.build:gradle to v8.7.2 (#1428)
renovate-bot Nov 5, 2024
479506c
Update dependency androidx.core:core-ktx to v1.15.0 (#1417)
renovate-bot Nov 5, 2024
bfbe71d
Update dependency androidx.compose:compose-bom to v2024.10.01 (#1424)
renovate-bot Nov 5, 2024
54a347d
Update dependency com.pinterest.ktlint:ktlint-cli to v1.4.1 (#1449)
renovate-bot Nov 5, 2024
f2f6d78
Update dependency io.coil-kt.coil3:coil-bom to v3.0.1 (#1454)
renovate-bot Nov 7, 2024
33b839a
Update dependency com.android.tools:desugar_jdk_libs to v2.1.3 (#1453)
renovate-bot Nov 7, 2024
bbb8462
Update dependency androidx.work:work-runtime to v2.10.0
Secozzi Jan 1, 2025
29d9a8d
Fix crash after removing last category while it's active in library (…
cuong-tran Nov 7, 2024
f92ca03
Update dependency io.coil-kt.coil3:coil-bom to v3.0.2 (#1469)
renovate-bot Nov 11, 2024
0baedab
Update dependency io.coil-kt.coil3:coil-bom to v3.0.3 (#1485)
renovate-bot Nov 15, 2024
36391b9
Update GitHub Actions (#1477)
renovate-bot Nov 15, 2024
00e1123
Update dependency androidx.viewpager:viewpager to v1.1.0-rc01 (#1480)
renovate-bot Nov 15, 2024
bee37d4
Update paging.version to v3.3.4 (#1481)
renovate-bot Nov 15, 2024
a57b97f
Fix reader transition color scheme in auto background mode (#1487)
cuong-tran Nov 16, 2024
a7c4ca8
Revert "Add option to always use SSIV for image decoding"
AntsyLich Nov 16, 2024
f14d4ed
Switch to hardware bitmap in reader only if device can handle it
AntsyLich Nov 16, 2024
335b7ce
Add option to lower the threshold for hardware bitmaps
AntsyLich Nov 20, 2024
20aa433
Fix loading screen not appearing when changing query in browser screen
Secozzi Jan 1, 2025
ecf7fe8
Slightly tweak Preference.PreferenceItem.CustomPreference
AntsyLich Nov 16, 2024
b535a06
Fix app update error notification disappearing (#1476)
cuong-tran Nov 20, 2024
804ac76
Improve hardware bitmap threshold option
AntsyLich Nov 21, 2024
de2b50d
Update dependency gradle to v8.11.1 (#1475)
renovate-bot Nov 21, 2024
ffc0210
Update dependency io.coil-kt.coil3:coil-bom to v3.0.4 (#1510)
renovate-bot Nov 26, 2024
910a9cf
Update dependency org.jsoup:jsoup to v1.18.2 (#1515)
renovate-bot Nov 27, 2024
e58602a
Add a Honor system app to list of invalid browsers (#1520)
MajorTanya Nov 27, 2024
7309fb9
Translations update from Hosted Weblate (#1423)
weblate Nov 30, 2024
4a74686
Update GitHub Actions (#1494)
renovate-bot Nov 30, 2024
debbc53
Always use software bitmap on certain devices (#1543)
MajorTanya Dec 6, 2024
814119d
Translations update from Hosted Weblate (#1531)
weblate Dec 6, 2024
442491e
Update kotlin monorepo to v2.1.0 (#1518)
renovate-bot Dec 7, 2024
dfeae7b
Update dependency org.jsoup:jsoup to v1.18.3 (#1533)
renovate-bot Dec 7, 2024
9aec078
Update dependency com.pinterest.ktlint:ktlint-cli to v1.5.0 (#1540)
renovate-bot Dec 7, 2024
2526135
Update dependency com.android.tools.build:gradle to v8.7.3 (#1535)
renovate-bot Dec 7, 2024
d74f03a
Update moko-resources to v0.24.4 (#1553)
renovate-bot Dec 8, 2024
e7df367
Migrate renovate config (#1572)
renovate-bot Dec 12, 2024
0facd79
Update dependency io.mockk:mockk to v1.13.14 (#1601)
renovate-bot Dec 21, 2024
3241b8a
Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-bom to v1.…
renovate-bot Dec 21, 2024
3c9d5bf
Update dependency com.android.tools:desugar_jdk_libs to v2.1.4 (#1599)
renovate-bot Dec 21, 2024
526e613
Update voyager to v1.0.1 (#1595)
renovate-bot Dec 21, 2024
0a41be6
Update dependency org.junit.jupiter:junit-jupiter to v5.11.4 (#1580)
renovate-bot Dec 21, 2024
d459fd0
Update dependency androidx.viewpager:viewpager to v1.1.0 (#1571)
renovate-bot Dec 21, 2024
aaeb2fa
Update paging.version to v3.3.5 (#1563)
renovate-bot Dec 21, 2024
99cafb2
Update dependency androidx.compose:compose-bom to v2024.12.01 (#1564)
renovate-bot Dec 21, 2024
ba01f46
Update dependency gradle to v8.12 (#1605)
renovate-bot Dec 21, 2024
69b75c4
Revert "Revert "Add option to always use SSIV for image decoding""
AntsyLich Dec 21, 2024
5323328
Update CHANGELOG.md
Secozzi Jan 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"extends": ["config:recommended"],
"labels": ["Dependencies"],
"semanticCommits": "disabled",
"packageRules": [
{
"groupName": "GitHub Actions",
"matchManagers": ["github-actions"],
"pinDigests": true,
}
]
},
],
}
6 changes: 3 additions & 3 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Dependency Review
uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

- name: Set up JDK
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
Expand All @@ -43,7 +43,7 @@ jobs:
distribution: adopt

- name: Set up gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Set up JDK
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
Expand All @@ -34,7 +34,7 @@ jobs:
distribution: adopt

- name: Set up gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Create Release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'aniyomiorg/aniyomi'
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
with:
tag_name: ${{ env.VERSION_TAG }}
name: Aniyomi ${{ env.VERSION_TAG }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- feat(player): video filters ([@abdallahmehiz](https://github.com/abdallahmehiz)) ([#1698](https://github.com/aniyomiorg/aniyomi/pull/1698))
- feat(player): Add better auto sub select ([@Secozzi](https://github.com/Secozzi)) ([#1706](https://github.com/aniyomiorg/aniyomi/pull/1706))
- feat(downloader): Copy the file location when using ext downloader ([@quickdesh](https://github.com/quickdesh)) ([#1758](https://github.com/aniyomiorg/aniyomi/pull/1758))
- feat(player): Replace player with mpvKt ([@Secozzi](https://github.com/Secozzi)) ([#1834](https://github.com/aniyomiorg/aniyomi/pull/1834), [#1855](https://github.com/aniyomiorg/aniyomi/pull/1855), [#1859](https://github.com/aniyomiorg/aniyomi/pull/1859), [#1860](https://github.com/aniyomiorg/aniyomi/pull/1860))

### Improved

Expand All @@ -28,12 +29,14 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- fix(animescreen): Fix airing time not showing ([@Secozzi](https://github.com/Secozzi)) ([#1720](https://github.com/aniyomiorg/aniyomi/pull/1720))
- fix hidden categories getting reset after delete/reorder ([@cuong-tran](https://github.com/cuong-tran)) ([#1780](https://github.com/aniyomiorg/aniyomi/pull/1780))
- Fix episode progress not being saved and duplicate tracks ([@perokhe](https://github.com/perokhe)) ([#1784](https://github.com/aniyomiorg/aniyomi/pull/1784), [#1785](https://github.com/aniyomiorg/aniyomi/pull/1785))
- Fix history date header duplication ([@quickdesh](https://github.com/quickdesh)) ([#1817](https://github.com/aniyomiorg/aniyomi/pull/1817))

### Other

- Merge from mihon until 0.16.5 ([@Secozzi](https://github.com/Secozzi)) ([#1663](https://github.com/aniyomiorg/aniyomi/pull/1663))
- Merge until latest mihon commits ([@Secozzi](https://github.com/Secozzi)) ([#1693](https://github.com/aniyomiorg/aniyomi/pull/1693))
- Merge until latest mihon commits (v0.17.0) ([@Secozzi](https://github.com/Secozzi)) ([#1804](https://github.com/aniyomiorg/aniyomi/pull/1804))
- Merge until latest mihon commits (TODO(merge)) ([@Secozzi](https://github.com/Secozzi)) ([#1863](https://github.com/aniyomiorg/aniyomi/pull/1863))

## [v0.16.4.3] - 2024-07-01
### Fixed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ The developer(s) of this application does not have any affiliation with the cont

<pre>
Copyright © 2015 Javier Tomás
Copyright © 2024 The Mihon Open Source Project
Copyright © 2024 The Aniyomi Open Source Project
Copyright © 2024 Mihon Open Source Project
Copyright © 2024 Aniyomi Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -84,4 +84,4 @@ See the License for the specific language governing permissions and
limitations under the License.
</pre>

</div>
</div>
45 changes: 20 additions & 25 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@file:Suppress("ChromeOsAbiSupport")

import mihon.buildlogic.getBuildTime
import mihon.buildlogic.getCommitCount
import mihon.buildlogic.getGitSha
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("mihon.android.application")
Expand Down Expand Up @@ -148,6 +149,24 @@ android {
}
}

kotlin {
compilerOptions {
freeCompilerArgs.addAll(
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
"-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-opt-in=coil3.annotation.ExperimentalCoilApi",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
)
}
}

dependencies {
implementation(projects.i18n)
implementation(projects.core.archive)
Expand Down Expand Up @@ -293,30 +312,6 @@ androidComponents {
}
}

tasks {
// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
withType<KotlinCompile> {
compilerOptions.freeCompilerArgs.addAll(
listOf(
"-Xcontext-receivers",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material.ExperimentalMaterialApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.material.ExperimentalMaterialApi",
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
"-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi",
"-opt-in=coil3.annotation.ExperimentalCoilApi",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
),
)
}
}

buildscript {
dependencies {
classpath(kotlinx.gradle)
Expand Down
61 changes: 2 additions & 59 deletions app/src/main/java/eu/kanade/core/util/CollectionUtils.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package eu.kanade.core.util

import androidx.compose.ui.util.fastFilter
import androidx.compose.ui.util.fastForEach
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
Expand Down Expand Up @@ -45,21 +46,6 @@ fun <E> HashSet<E>.addOrRemove(value: E, shouldAdd: Boolean) {
}
}

/**
* Returns a list containing only elements matching the given [predicate].
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastFilter(predicate: (T) -> Boolean): List<T> {
contract { callsInPlace(predicate) }
val destination = ArrayList<T>()
fastForEach { if (predicate(it)) destination.add(it) }
return destination
}

/**
* Returns a list containing all elements not matching the given [predicate].
*
Expand All @@ -70,27 +56,7 @@ inline fun <T> List<T>.fastFilter(predicate: (T) -> Boolean): List<T> {
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastFilterNot(predicate: (T) -> Boolean): List<T> {
contract { callsInPlace(predicate) }
val destination = ArrayList<T>()
fastForEach { if (!predicate(it)) destination.add(it) }
return destination
}

/**
* Returns a list containing only the non-null results of applying the
* given [transform] function to each element in the original collection.
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T, R> List<T>.fastMapNotNull(transform: (T) -> R?): List<R> {
contract { callsInPlace(transform) }
val destination = ArrayList<R>()
fastForEach { element ->
transform(element)?.let(destination::add)
}
return destination
return fastFilter { !predicate(it) }
}

/**
Expand Down Expand Up @@ -131,26 +97,3 @@ inline fun <T> List<T>.fastCountNot(predicate: (T) -> Boolean): Int {
fastForEach { if (predicate(it)) --count }
return count
}

/**
* Returns a list containing only elements from the given collection
* having distinct keys returned by the given [selector] function.
*
* Among elements of the given collection with equal keys, only the first one will be present in the resulting list.
* The elements in the resulting list are in the same order as they were in the source collection.
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T, K> List<T>.fastDistinctBy(selector: (T) -> K): List<T> {
contract { callsInPlace(selector) }
val set = HashSet<K>()
val list = ArrayList<T>()
fastForEach {
val key = selector(it)
if (set.add(key)) list.add(it)
}
return list
}
5 changes: 5 additions & 0 deletions app/src/main/java/eu/kanade/domain/base/BasePreferences.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package eu.kanade.domain.base
import android.content.Context
import android.content.pm.PackageManager
import dev.icerock.moko.resources.StringResource
import eu.kanade.tachiyomi.util.system.GLUtil
import tachiyomi.core.common.preference.Preference
import tachiyomi.core.common.preference.PreferenceStore
import tachiyomi.i18n.MR
Expand Down Expand Up @@ -35,4 +36,8 @@ class BasePreferences(
}

fun displayProfile() = preferenceStore.getString("pref_display_profile_key", "")

fun hardwareBitmapThreshold() = preferenceStore.getInt("pref_hardware_bitmap_threshold", GLUtil.SAFE_TEXTURE_LIMIT)

fun alwaysDecodeLongStripWithSSIV() = preferenceStore.getBoolean("pref_always_decode_long_strip_with_ssiv", false)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ internal fun LibraryTabs(
getNumberOfItemsForCategory: (Category) -> Int?,
onTabItemClick: (Int) -> Unit,
) {
val currentPageIndex = pagerState.currentPage.coerceAtMost(categories.lastIndex)
Column(
modifier = Modifier.zIndex(1f),
) {
PrimaryScrollableTabRow(
selectedTabIndex = pagerState.currentPage,
selectedTabIndex = currentPageIndex,
edgePadding = 0.dp,
// TODO: use default when width is fixed upstream
// https://issuetracker.google.com/issues/242879624
divider = {},
) {
categories.forEachIndexed { index, category ->
Tab(
selected = pagerState.currentPage == index,
selected = currentPageIndex == index,
onClick = { onTabItemClick(index) },
text = {
TabText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ sealed class Preference {

data class CustomPreference(
override val title: String,
val content: @Composable (PreferenceItem<String>) -> Unit,
) : PreferenceItem<String>() {
val content: @Composable () -> Unit,
) : PreferenceItem<Unit>() {
override val enabled: Boolean = true
override val subtitle: String? = null
override val icon: ImageVector? = null
override val onValueChanged: suspend (newValue: String) -> Boolean = { true }
override val onValueChanged: suspend (newValue: Unit) -> Boolean = { true }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ internal fun PreferenceItem(
InfoWidget(text = item.title)
}
is Preference.PreferenceItem.CustomPreference -> {
item.content(item)
item.content()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import eu.kanade.tachiyomi.network.PREF_DOH_QUAD9
import eu.kanade.tachiyomi.network.PREF_DOH_SHECAN
import eu.kanade.tachiyomi.ui.more.OnboardingScreen
import eu.kanade.tachiyomi.util.CrashLogUtil
import eu.kanade.tachiyomi.util.system.GLUtil
import eu.kanade.tachiyomi.util.system.isDevFlavor
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
import eu.kanade.tachiyomi.util.system.isShizukuInstalled
Expand All @@ -72,6 +73,7 @@ import okhttp3.Headers
import tachiyomi.core.common.i18n.stringResource
import tachiyomi.core.common.util.lang.launchNonCancellable
import tachiyomi.core.common.util.lang.withUIContext
import tachiyomi.core.common.util.system.ImageUtil
import tachiyomi.core.common.util.system.logcat
import tachiyomi.domain.entries.manga.interactor.ResetMangaViewerFlags
import tachiyomi.i18n.MR
Expand Down Expand Up @@ -360,6 +362,31 @@ object SettingsAdvancedScreen : SearchableSettings {
return Preference.PreferenceGroup(
title = stringResource(MR.strings.pref_category_reader),
preferenceItems = persistentListOf(
Preference.PreferenceItem.ListPreference(
pref = basePreferences.hardwareBitmapThreshold(),
title = stringResource(MR.strings.pref_hardware_bitmap_threshold),
subtitleProvider = { value, options ->
stringResource(MR.strings.pref_hardware_bitmap_threshold_summary, options[value].orEmpty())
},
enabled = !ImageUtil.HARDWARE_BITMAP_UNSUPPORTED &&
GLUtil.DEVICE_TEXTURE_LIMIT > GLUtil.SAFE_TEXTURE_LIMIT,
entries = GLUtil.CUSTOM_TEXTURE_LIMIT_OPTIONS
.mapIndexed { index, option ->
val display = if (index == 0) {
stringResource(MR.strings.pref_hardware_bitmap_threshold_default, option)
} else {
option.toString()
}
option to display
}
.toMap()
.toImmutableMap(),
),
Preference.PreferenceItem.SwitchPreference(
pref = basePreferences.alwaysDecodeLongStripWithSSIV(),
title = stringResource(MR.strings.pref_always_decode_long_strip_with_ssiv),
subtitle = stringResource(MR.strings.pref_always_decode_long_strip_with_ssiv_summary),
),
Preference.PreferenceItem.TextPreference(
title = stringResource(MR.strings.pref_display_profile),
subtitle = basePreferences.displayProfile().get(),
Expand Down
Loading
Loading