pro版本添加自定义启动画面

pull/1689/head
kunfei 3 years ago
parent f0a6a55490
commit 876e86cabf
  1. 5
      app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt

@ -107,8 +107,8 @@ class WelcomeConfigFragment : BasePreferenceFragment(),
private fun upPreferenceSummary(preferenceKey: String, value: String?) { private fun upPreferenceSummary(preferenceKey: String, value: String?) {
val preference = findPreference<Preference>(preferenceKey) ?: return val preference = findPreference<Preference>(preferenceKey) ?: return
when (preferenceKey) { when (preferenceKey) {
PreferKey.defaultCover, PreferKey.welcomeImage,
PreferKey.defaultCoverDark -> preference.summary = if (value.isNullOrBlank()) { PreferKey.welcomeImageDark -> preference.summary = if (value.isNullOrBlank()) {
getString(R.string.select_image) getString(R.string.select_image)
} else { } else {
value value
@ -123,7 +123,6 @@ class WelcomeConfigFragment : BasePreferenceFragment(),
file = FileUtils.createFileIfNotExist(file, "covers", name) file = FileUtils.createFileIfNotExist(file, "covers", name)
file.writeBytes(bytes) file.writeBytes(bytes)
putPrefString(preferenceKey, file.absolutePath) putPrefString(preferenceKey, file.absolutePath)
BookCover.upDefaultCover()
} }
} }

Loading…
Cancel
Save