From 666a7e4d77cced3d1276b9c3d2e2b73dda853592 Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:54:13 +0800 Subject: [PATCH] Allow disable list item animations on API 29+ (#1024) * Allow disable list item animations on API 29+ * Update list item animations setting description --- .../ehviewer/ui/settings/AdvancedScreen.kt | 17 +++++++---------- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/settings/AdvancedScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/settings/AdvancedScreen.kt index 4a5194942..d6c9cae7c 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/settings/AdvancedScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/settings/AdvancedScreen.kt @@ -43,7 +43,6 @@ import com.hippo.ehviewer.ui.tools.observed import com.hippo.ehviewer.util.AppConfig import com.hippo.ehviewer.util.Crash import com.hippo.ehviewer.util.ReadableTime -import com.hippo.ehviewer.util.isAtLeastQ import com.jamal.composeprefs3.ui.prefs.SwitchPref import com.ramcosta.composedestinations.annotation.Destination import com.ramcosta.composedestinations.annotation.RootGraph @@ -145,15 +144,13 @@ fun AdvancedScreen(navigator: DestinationsNavigator) { title = stringResource(id = R.string.preload_thumb_aggressively), value = Settings::preloadThumbAggressively, ) - if (!isAtLeastQ) { - var animateItems by Settings.animateItems.asMutableState() - SwitchPref( - checked = animateItems, - onMutate = { animateItems = !animateItems }, - title = stringResource(id = R.string.animate_items), - summary = stringResource(id = R.string.animate_items_summary), - ) - } + var animateItems by Settings.animateItems.asMutableState() + SwitchPref( + checked = animateItems, + onMutate = { animateItems = !animateItems }, + title = stringResource(id = R.string.animate_items), + summary = stringResource(id = R.string.animate_items_summary), + ) IntSliderPreference( maxValue = 5, minValue = 1, diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 9c09fe5c5..a4760fcb6 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -478,7 +478,7 @@ 账户 激进地预载缩略图 列表项目动画 - 如果应用崩溃请尝试禁用此项 + 如遇崩溃/掉帧请尝试禁用此项 自动检查更新 从不 每天 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e93f14d58..a068f258c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -533,7 +533,7 @@ Account Preload thumbs aggressively List item animations - Try disabling this if you are facing crashes + Try disabling this if you are facing crashes / frame drops User Agent Automatically check for updates Never