pull/1395/head
gedoor 3 years ago
parent bd02f5ef5d
commit 205895dfd6
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  3. 3
      app/src/main/java/io/legado/app/ui/login/SourceLoginActivity.kt
  4. 4
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt
  5. 3
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt

@ -56,15 +56,15 @@ abstract class ReadBookBaseActivity :
} }
fun showPaddingConfig() { fun showPaddingConfig() {
PaddingConfigDialog().show(supportFragmentManager, "paddingConfig") showDialogFragment<PaddingConfigDialog>()
} }
fun showBgTextConfig() { fun showBgTextConfig() {
BgTextConfigDialog().show(supportFragmentManager, "bgTextConfig") showDialogFragment<BgTextConfigDialog>()
} }
fun showClickRegionalConfig() { fun showClickRegionalConfig() {
ClickActionConfigDialog().show(supportFragmentManager, "clickActionConfig") showDialogFragment<ClickActionConfigDialog>()
} }
/** /**

@ -124,8 +124,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
R.id.menu_share_source -> viewModel.shareSelection(adapter.selection) { R.id.menu_share_source -> viewModel.shareSelection(adapter.selection) {
startActivity(Intent.createChooser(it, getString(R.string.share_selected_source))) startActivity(Intent.createChooser(it, getString(R.string.share_selected_source)))
} }
R.id.menu_group_manage -> R.id.menu_group_manage -> showDialogFragment<GroupManageDialog>()
GroupManageDialog().show(supportFragmentManager, "groupManage")
R.id.menu_import_local -> importDoc.launch { R.id.menu_import_local -> importDoc.launch {
mode = HandleFileContract.FILE mode = HandleFileContract.FILE
allowExtensions = arrayOf("txt", "json") allowExtensions = arrayOf("txt", "json")

@ -6,6 +6,7 @@ import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.BaseSource import io.legado.app.data.entities.BaseSource
import io.legado.app.databinding.ActivitySourceLoginBinding import io.legado.app.databinding.ActivitySourceLoginBinding
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -28,7 +29,7 @@ class SourceLoginActivity : VMBaseActivity<ActivitySourceLoginBinding, SourceLog
.replace(R.id.fl_fragment, WebViewLoginFragment()) .replace(R.id.fl_fragment, WebViewLoginFragment())
.commit() .commit()
} else { } else {
RuleUiLoginDialog().show(supportFragmentManager, "ruleUiLogin") showDialogFragment<RuleUiLoginDialog>()
} }
} }

@ -216,9 +216,7 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
when (item.itemId) { when (item.itemId) {
R.id.menu_add_replace_rule -> R.id.menu_add_replace_rule ->
editActivity.launch(ReplaceEditActivity.startIntent(this)) editActivity.launch(ReplaceEditActivity.startIntent(this))
R.id.menu_group_manage -> R.id.menu_group_manage -> showDialogFragment<GroupManageDialog>()
GroupManageDialog().show(supportFragmentManager, "groupManage")
R.id.menu_del_selection -> viewModel.delSelection(adapter.selection) R.id.menu_del_selection -> viewModel.delSelection(adapter.selection)
R.id.menu_import_onLine -> showImportDialog() R.id.menu_import_onLine -> showImportDialog()
R.id.menu_import_local -> importDoc.launch { R.id.menu_import_local -> importDoc.launch {

@ -115,8 +115,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
} }
R.id.menu_import_onLine -> showImportDialog() R.id.menu_import_onLine -> showImportDialog()
R.id.menu_import_qr -> qrCodeResult.launch(null) R.id.menu_import_qr -> qrCodeResult.launch(null)
R.id.menu_group_manage -> GroupManageDialog() R.id.menu_group_manage -> showDialogFragment<GroupManageDialog>()
.show(supportFragmentManager, "rssGroupManage")
R.id.menu_share_source -> viewModel.shareSelection(adapter.selection) { R.id.menu_share_source -> viewModel.shareSelection(adapter.selection) {
startActivity(Intent.createChooser(it, getString(R.string.share_selected_source))) startActivity(Intent.createChooser(it, getString(R.string.share_selected_source)))
} }

Loading…
Cancel
Save