|
|
@ -7,9 +7,7 @@ import androidx.preference.EditTextPreference |
|
|
|
import androidx.preference.ListPreference |
|
|
|
import androidx.preference.ListPreference |
|
|
|
import androidx.preference.Preference |
|
|
|
import androidx.preference.Preference |
|
|
|
import androidx.preference.PreferenceFragmentCompat |
|
|
|
import androidx.preference.PreferenceFragmentCompat |
|
|
|
import io.legado.app.App |
|
|
|
|
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.help.coroutine.Coroutine |
|
|
|
|
|
|
|
import io.legado.app.help.permission.Permissions |
|
|
|
import io.legado.app.help.permission.Permissions |
|
|
|
import io.legado.app.help.permission.PermissionsCompat |
|
|
|
import io.legado.app.help.permission.PermissionsCompat |
|
|
|
import io.legado.app.help.storage.Backup |
|
|
|
import io.legado.app.help.storage.Backup |
|
|
@ -22,8 +20,6 @@ import io.legado.app.lib.theme.ATH |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
import io.legado.app.utils.getPrefString |
|
|
|
import io.legado.app.utils.getPrefString |
|
|
|
import kotlinx.coroutines.Dispatchers |
|
|
|
|
|
|
|
import kotlinx.coroutines.withContext |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WebDavConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChangeListener { |
|
|
|
class WebDavConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChangeListener { |
|
|
|
|
|
|
|
|
|
|
@ -103,8 +99,6 @@ class WebDavConfigFragment : PreferenceFragmentCompat(), Preference.OnPreference |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun importOld() { |
|
|
|
private fun importOld() { |
|
|
|
Coroutine.async { |
|
|
|
|
|
|
|
if (withContext(Dispatchers.IO) { App.db.bookDao().allBookCount == 0 }) { |
|
|
|
|
|
|
|
alert(title = "导入") { |
|
|
|
alert(title = "导入") { |
|
|
|
message = "是否导入旧版本数据" |
|
|
|
message = "是否导入旧版本数据" |
|
|
|
yesButton { |
|
|
|
yesButton { |
|
|
@ -120,7 +114,5 @@ class WebDavConfigFragment : PreferenceFragmentCompat(), Preference.OnPreference |
|
|
|
} |
|
|
|
} |
|
|
|
}.show().applyTint() |
|
|
|
}.show().applyTint() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |