mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
89a85bbc24
commit
573cf6542a
@ -220,12 +220,17 @@ object Restore {
|
||||
if (BackupConfig.keyIsNotIgnore(key)) {
|
||||
when (key) {
|
||||
PreferKey.webDavPassword -> {
|
||||
edit.putString(
|
||||
key,
|
||||
kotlin.runCatching {
|
||||
aes.decryptStr(value.toString())
|
||||
}.getOrDefault(value.toString())
|
||||
)
|
||||
kotlin.runCatching {
|
||||
aes.decryptStr(value.toString())
|
||||
}.getOrNull()?.let {
|
||||
edit.putString(key, it)
|
||||
} ?: let {
|
||||
if (appCtx.getPrefString(PreferKey.webDavPassword)
|
||||
.isNullOrBlank()
|
||||
) {
|
||||
edit.putString(key, value.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> when (value) {
|
||||
|
Loading…
Reference in New Issue
Block a user