|
|
@ -24,6 +24,7 @@ import io.legado.app.ui.config.ConfigActivity |
|
|
|
import io.legado.app.ui.config.ConfigViewModel |
|
|
|
import io.legado.app.ui.config.ConfigViewModel |
|
|
|
import io.legado.app.ui.filechooser.FileChooserDialog |
|
|
|
import io.legado.app.ui.filechooser.FileChooserDialog |
|
|
|
import io.legado.app.ui.replacerule.ReplaceRuleActivity |
|
|
|
import io.legado.app.ui.replacerule.ReplaceRuleActivity |
|
|
|
|
|
|
|
import io.legado.app.ui.widget.dialog.TextDialog |
|
|
|
import io.legado.app.ui.widget.prefs.NameListPreference |
|
|
|
import io.legado.app.ui.widget.prefs.NameListPreference |
|
|
|
import io.legado.app.ui.widget.prefs.PreferenceCategory |
|
|
|
import io.legado.app.ui.widget.prefs.PreferenceCategory |
|
|
|
import io.legado.app.ui.widget.prefs.SwitchPreference |
|
|
|
import io.legado.app.ui.widget.prefs.SwitchPreference |
|
|
@ -48,9 +49,10 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog. |
|
|
|
|
|
|
|
|
|
|
|
override fun onCompatOptionsItemSelected(item: MenuItem) { |
|
|
|
override fun onCompatOptionsItemSelected(item: MenuItem) { |
|
|
|
when (item.itemId) { |
|
|
|
when (item.itemId) { |
|
|
|
R.id.menu_help -> startActivity<AboutActivity>() |
|
|
|
R.id.menu_help -> { |
|
|
|
R.id.menu_backup -> BackupRestoreUi.backup(this) |
|
|
|
val text = String(requireContext().assets.open("help.md").readBytes()) |
|
|
|
R.id.menu_restore -> BackupRestoreUi.restore(this) |
|
|
|
TextDialog.show(childFragmentManager, text, TextDialog.MD) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|