|
|
@ -163,17 +163,19 @@ class ThemeConfigFragment : BasePreferenceFragment(), |
|
|
|
"saveDayTheme", "saveNightTheme" -> alertSaveTheme(key) |
|
|
|
"saveDayTheme", "saveNightTheme" -> alertSaveTheme(key) |
|
|
|
PreferKey.bgImage -> selectBgAction(false) |
|
|
|
PreferKey.bgImage -> selectBgAction(false) |
|
|
|
PreferKey.bgImageN -> selectBgAction(true) |
|
|
|
PreferKey.bgImageN -> selectBgAction(true) |
|
|
|
PreferKey.defaultCover -> if (getPrefString(PreferKey.defaultCover).isNullOrEmpty()) { |
|
|
|
PreferKey.defaultCover -> |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
if (getPrefString(PreferKey.defaultCover).isNullOrEmpty()) { |
|
|
|
} else { |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
} else { |
|
|
|
if (i == 0) { |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
removePref(PreferKey.defaultCover) |
|
|
|
if (i == 0) { |
|
|
|
} else { |
|
|
|
removePref(PreferKey.defaultCover) |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
CoverImageView.upDefaultCover() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PreferKey.defaultCoverDark -> |
|
|
|
PreferKey.defaultCoverDark -> |
|
|
|
if (getPrefString(PreferKey.defaultCoverDark).isNullOrEmpty()) { |
|
|
|
if (getPrefString(PreferKey.defaultCoverDark).isNullOrEmpty()) { |
|
|
|
selectImage.launch(requestCodeCoverDark) |
|
|
|
selectImage.launch(requestCodeCoverDark) |
|
|
@ -181,6 +183,7 @@ class ThemeConfigFragment : BasePreferenceFragment(), |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
if (i == 0) { |
|
|
|
if (i == 0) { |
|
|
|
removePref(PreferKey.defaultCoverDark) |
|
|
|
removePref(PreferKey.defaultCoverDark) |
|
|
|
|
|
|
|
CoverImageView.upDefaultCover() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
selectImage.launch(requestCodeCoverDark) |
|
|
|
selectImage.launch(requestCodeCoverDark) |
|
|
|
} |
|
|
|
} |
|
|
|