|
|
|
@ -28,7 +28,6 @@ import io.legado.app.lib.permission.PermissionsCompat |
|
|
|
|
import io.legado.app.lib.theme.ATH |
|
|
|
|
import io.legado.app.ui.widget.number.NumberPickerDialog |
|
|
|
|
import io.legado.app.ui.widget.prefs.ColorPreference |
|
|
|
|
import io.legado.app.ui.widget.prefs.PreferenceCategory |
|
|
|
|
import io.legado.app.utils.* |
|
|
|
|
import java.io.File |
|
|
|
|
|
|
|
|
@ -55,15 +54,8 @@ class ThemeConfigFragment : BasePreferenceFragment(), |
|
|
|
|
if (Build.VERSION.SDK_INT < 26) { |
|
|
|
|
preferenceScreen.removePreferenceRecursively(PreferKey.launcherIcon) |
|
|
|
|
} |
|
|
|
|
if (AppConfig.isGooglePlay) { |
|
|
|
|
upPreferenceSummary(PreferKey.bgImage, getPrefString(PreferKey.bgImage)) |
|
|
|
|
upPreferenceSummary(PreferKey.bgImageN, getPrefString(PreferKey.bgImageN)) |
|
|
|
|
} else { |
|
|
|
|
findPreference<PreferenceCategory>("dayThemeCategory") |
|
|
|
|
?.removePreferenceRecursively(PreferKey.bgImage) |
|
|
|
|
findPreference<PreferenceCategory>("nightThemeCategory") |
|
|
|
|
?.removePreferenceRecursively(PreferKey.bgImageN) |
|
|
|
|
} |
|
|
|
|
upPreferenceSummary(PreferKey.bgImage, getPrefString(PreferKey.bgImage)) |
|
|
|
|
upPreferenceSummary(PreferKey.bgImageN, getPrefString(PreferKey.bgImageN)) |
|
|
|
|
upPreferenceSummary(PreferKey.barElevation, AppConfig.elevation.toString()) |
|
|
|
|
findPreference<ColorPreference>(PreferKey.cBackground)?.let { |
|
|
|
|
it.onSaveColor = { color -> |
|
|
|
|