|
|
@@ -35,9 +35,17 @@ import io.legado.app.lib.prefs.fragment.PreferenceFragment
|
|
|
import io.legado.app.lib.theme.primaryColor
|
|
|
import io.legado.app.ui.about.AppLogDialog
|
|
|
import io.legado.app.ui.file.HandleFileContract
|
|
|
-import io.legado.app.ui.widget.dialog.TextDialog
|
|
|
import io.legado.app.ui.widget.dialog.WaitDialog
|
|
|
-import io.legado.app.utils.*
|
|
|
+import io.legado.app.utils.applyTint
|
|
|
+import io.legado.app.utils.checkWrite
|
|
|
+import io.legado.app.utils.getPrefString
|
|
|
+import io.legado.app.utils.isContentScheme
|
|
|
+import io.legado.app.utils.launch
|
|
|
+import io.legado.app.utils.setEdgeEffectColor
|
|
|
+import io.legado.app.utils.showDialogFragment
|
|
|
+import io.legado.app.utils.showHelp
|
|
|
+import io.legado.app.utils.toEditable
|
|
|
+import io.legado.app.utils.toastOnUi
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
import kotlinx.coroutines.Dispatchers.Main
|
|
|
import kotlinx.coroutines.Job
|
|
|
@@ -150,7 +158,7 @@ class BackupConfigFragment : PreferenceFragment(),
|
|
|
listView.setEdgeEffectColor(primaryColor)
|
|
|
activity?.addMenuProvider(this, viewLifecycleOwner)
|
|
|
if (!LocalConfig.backupHelpVersionIsLast) {
|
|
|
- showHelp()
|
|
|
+ showHelp("webDavHelp")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -162,7 +170,7 @@ class BackupConfigFragment : PreferenceFragment(),
|
|
|
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
|
|
when (menuItem.itemId) {
|
|
|
R.id.menu_help -> {
|
|
|
- showHelp()
|
|
|
+ showHelp("webDavHelp")
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
@@ -171,11 +179,6 @@ class BackupConfigFragment : PreferenceFragment(),
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- private fun showHelp() {
|
|
|
- val text = String(requireContext().assets.open("web/help/md/webDavHelp.md").readBytes())
|
|
|
- showDialogFragment(TextDialog(getString(R.string.help), text, TextDialog.Mode.MD))
|
|
|
- }
|
|
|
-
|
|
|
override fun onDestroy() {
|
|
|
super.onDestroy()
|
|
|
preferenceManager.sharedPreferences?.unregisterOnSharedPreferenceChangeListener(this)
|