Jelajahi Sumber

透明主题未要求设置背景问题 #158

HapeLee 1 tahun lalu
induk
melakukan
e1d581375a

+ 2 - 2
app/src/main/java/io/legato/kazusa/lib/prefs/ThemeCardPreference.kt

@@ -81,7 +81,7 @@ class ThemeCardPreference(context: Context, attrs: AttributeSet) : Preference(co
 
             holder.card.setOnClickListener {
                 if (value != currentValue) {
-                    if (value == "12") {
+                    if (value == "13") {
                         val hasLightBg = !appCtx.getPrefString(PreferKey.bgImage).isNullOrEmpty()
                         val hasDarkBg = !appCtx.getPrefString(PreferKey.bgImageN).isNullOrEmpty()
                         if (!hasLightBg || !hasDarkBg) {
@@ -94,7 +94,7 @@ class ThemeCardPreference(context: Context, attrs: AttributeSet) : Preference(co
                     persistString(value)
                     callChangeListener(value)
                     notifyDataSetChanged()
-                    val isDynamicSwitch = (oldValue == "11" || value == "11")
+                    val isDynamicSwitch = (oldValue == "12" || value == "12")
                     Handler(Looper.getMainLooper()).postDelayed({
                         if (isDynamicSwitch) {
                             context.alert(context.getString(R.string.restart_required_message)) {

+ 6 - 6
app/src/main/java/io/legato/kazusa/ui/config/ThemeConfigFragment.kt

@@ -121,9 +121,9 @@ class ThemeConfigFragment : PreferenceFragmentCompat(),
         val customMode = findPreference<NameListPreference>("customMode")
         val currentTheme = getPrefString("app_theme")
 
-        colorPrimary?.isVisible = currentTheme == "11"
-        colorImage?.isVisible = currentTheme == "11"
-        customMode?.isVisible = currentTheme == "11"
+        colorPrimary?.isVisible = currentTheme == "12"
+        colorImage?.isVisible = currentTheme == "12"
+        customMode?.isVisible = currentTheme == "12"
 
         themePref?.let {
             it.setOnPreferenceChangeListener { _, _ ->
@@ -132,9 +132,9 @@ class ThemeConfigFragment : PreferenceFragmentCompat(),
         }
 
         themePref?.setOnPreferenceChangeListener { _, newValue ->
-            colorPrimary?.isVisible = newValue == "11"
-            colorImage?.isVisible = currentTheme == "11"
-            customMode?.isVisible = newValue == "11"
+            colorPrimary?.isVisible = newValue == "12"
+            colorImage?.isVisible = currentTheme == "12"
+            customMode?.isVisible = newValue == "12"
             true
         }
 

+ 2 - 2
app/version.properties

@@ -1,4 +1,4 @@
 VERSION_MAJOR=3
-VERSION_MINOR=25
-VERSION_PATCH=15
+VERSION_MINOR=26
+VERSION_PATCH=1
 VERSION_SUFFIX=