|
|
@ -163,12 +163,14 @@ 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 -> |
|
|
|
|
|
|
|
if (getPrefString(PreferKey.defaultCover).isNullOrEmpty()) { |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
selector(items = arrayListOf("删除图片", "选择图片")) { _, i -> |
|
|
|
if (i == 0) { |
|
|
|
if (i == 0) { |
|
|
|
removePref(PreferKey.defaultCover) |
|
|
|
removePref(PreferKey.defaultCover) |
|
|
|
|
|
|
|
CoverImageView.upDefaultCover() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
selectImage.launch(requestCodeCover) |
|
|
|
} |
|
|
|
} |
|
|
@ -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) |
|
|
|
} |
|
|
|
} |
|
|
|