|
|
|
@ -24,6 +24,7 @@ import io.legado.app.ui.config.ConfigActivity |
|
|
|
|
import io.legado.app.ui.config.ConfigViewModel |
|
|
|
|
import io.legado.app.ui.filechooser.FileChooserDialog |
|
|
|
|
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.PreferenceCategory |
|
|
|
|
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) { |
|
|
|
|
when (item.itemId) { |
|
|
|
|
R.id.menu_help -> startActivity<AboutActivity>() |
|
|
|
|
R.id.menu_backup -> BackupRestoreUi.backup(this) |
|
|
|
|
R.id.menu_restore -> BackupRestoreUi.restore(this) |
|
|
|
|
R.id.menu_help -> { |
|
|
|
|
val text = String(requireContext().assets.open("help.md").readBytes()) |
|
|
|
|
TextDialog.show(childFragmentManager, text, TextDialog.MD) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|