fix some backup stuff

This commit is contained in:
Bnyro 2022-08-13 19:24:54 +02:00
parent 373acbf8b9
commit 11fc6fd1f2

View File

@ -50,13 +50,14 @@ class AdvancedSettings : MaterialPreferenceFragment() {
val backupSettings = findPreference<Preference>(PreferenceKeys.BACKUP_SETTINGS)
backupSettings?.setOnPreferenceClickListener {
createFile.launch("preferences.xml")
activity?.recreate()
true
}
val restoreSettings = findPreference<Preference>(PreferenceKeys.RESTORE_SETTINGS)
restoreSettings?.setOnPreferenceClickListener {
getContent.launch("*/*")
// reset the token
PreferenceHelper.setToken("")
activity?.recreate()
true
}