|
|
@ -121,6 +121,7 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
upPreferenceSummary(PreferKey.webDavUrl, getPrefString(PreferKey.webDavUrl)) |
|
|
|
upPreferenceSummary(PreferKey.webDavUrl, getPrefString(PreferKey.webDavUrl)) |
|
|
|
upPreferenceSummary(PreferKey.webDavAccount, getPrefString(PreferKey.webDavAccount)) |
|
|
|
upPreferenceSummary(PreferKey.webDavAccount, getPrefString(PreferKey.webDavAccount)) |
|
|
|
upPreferenceSummary(PreferKey.webDavPassword, getPrefString(PreferKey.webDavPassword)) |
|
|
|
upPreferenceSummary(PreferKey.webDavPassword, getPrefString(PreferKey.webDavPassword)) |
|
|
|
|
|
|
|
upPreferenceSummary(PreferKey.webDavDir, AppConfig.webDavDir) |
|
|
|
upPreferenceSummary(PreferKey.backupPath, getPrefString(PreferKey.backupPath)) |
|
|
|
upPreferenceSummary(PreferKey.backupPath, getPrefString(PreferKey.backupPath)) |
|
|
|
findPreference<io.legado.app.ui.widget.prefs.Preference>("web_dav_restore") |
|
|
|
findPreference<io.legado.app.ui.widget.prefs.Preference>("web_dav_restore") |
|
|
|
?.onLongClick { restoreDir.launch(); true } |
|
|
|
?.onLongClick { restoreDir.launch(); true } |
|
|
@ -168,6 +169,7 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
PreferKey.backupPath -> { |
|
|
|
PreferKey.backupPath -> { |
|
|
|
upPreferenceSummary(key, getPrefString(key)) |
|
|
|
upPreferenceSummary(key, getPrefString(key)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PreferKey.webDavDir -> upPreferenceSummary(key, AppConfig.webDavDir) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -192,6 +194,11 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
preference.summary = "*".repeat(value.toString().length) |
|
|
|
preference.summary = "*".repeat(value.toString().length) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PreferKey.webDavDir -> if (value.isNullOrBlank()) { |
|
|
|
|
|
|
|
preference.summary = "null" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
preference.summary = value |
|
|
|
|
|
|
|
} |
|
|
|
else -> { |
|
|
|
else -> { |
|
|
|
if (preference is ListPreference) { |
|
|
|
if (preference is ListPreference) { |
|
|
|
val index = preference.findIndexOfValue(value) |
|
|
|
val index = preference.findIndexOfValue(value) |
|
|
|