pull/1710/head
kunfei 3 years ago
parent acfe2090cf
commit 11fe757354
  1. 13
      app/src/main/java/io/legado/app/constant/AppConst.kt
  2. 6
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt

@ -51,19 +51,6 @@ object AppConst {
const val notificationIdDownload = -1122395 const val notificationIdDownload = -1122395
const val notificationIdCheckSource = -1122395 const val notificationIdCheckSource = -1122395
val urlOption: String by lazy {
"""
,{
'charset': '',
'method': 'POST',
'body': '',
'headers': {
'User-Agent': ''
}
}
""".trimIndent()
}
val menuViewNames = arrayOf( val menuViewNames = arrayOf(
"com.android.internal.view.menu.ListMenuItemView", "com.android.internal.view.menu.ListMenuItemView",
"androidx.appcompat.view.menu.ListMenuItemView" "androidx.appcompat.view.menu.ListMenuItemView"

@ -11,7 +11,6 @@ import com.google.android.material.tabs.TabLayout
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst
import io.legado.app.constant.BookType import io.legado.app.constant.BookType
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.data.entities.rule.* import io.legado.app.data.entities.rule.*
@ -26,6 +25,7 @@ import io.legado.app.ui.document.HandleFileContract
import io.legado.app.ui.login.SourceLoginActivity import io.legado.app.ui.login.SourceLoginActivity
import io.legado.app.ui.qrcode.QrCodeResult import io.legado.app.ui.qrcode.QrCodeResult
import io.legado.app.ui.widget.dialog.TextDialog import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.ui.widget.dialog.UrlOptionDialog
import io.legado.app.ui.widget.keyboard.KeyboardToolPop import io.legado.app.ui.widget.keyboard.KeyboardToolPop
import io.legado.app.utils.* import io.legado.app.utils.*
import io.legado.app.utils.viewbindingdelegate.viewBinding import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -447,7 +447,9 @@ class BookSourceEditActivity :
override fun onHelpActionSelect(action: String) { override fun onHelpActionSelect(action: String) {
when (action) { when (action) {
"urlOption" -> sendText(AppConst.urlOption) "urlOption" -> UrlOptionDialog(this) {
sendText(it)
}.show()
"ruleHelp" -> showHelp("ruleHelp") "ruleHelp" -> showHelp("ruleHelp")
"jsHelp" -> showHelp("jsHelp") "jsHelp" -> showHelp("jsHelp")
"regexHelp" -> showHelp("regexHelp") "regexHelp" -> showHelp("regexHelp")

Loading…
Cancel
Save