diff --git a/app/src/main/java/io/legado/app/constant/AppConst.kt b/app/src/main/java/io/legado/app/constant/AppConst.kt index 87461bb76..d8c5b2d00 100644 --- a/app/src/main/java/io/legado/app/constant/AppConst.kt +++ b/app/src/main/java/io/legado/app/constant/AppConst.kt @@ -51,19 +51,6 @@ object AppConst { const val notificationIdDownload = -1122395 const val notificationIdCheckSource = -1122395 - val urlOption: String by lazy { - """ - ,{ - 'charset': '', - 'method': 'POST', - 'body': '', - 'headers': { - 'User-Agent': '' - } - } - """.trimIndent() - } - val menuViewNames = arrayOf( "com.android.internal.view.menu.ListMenuItemView", "androidx.appcompat.view.menu.ListMenuItemView" diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index b5f472eb8..9b58c9a44 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt @@ -11,7 +11,6 @@ import com.google.android.material.tabs.TabLayout import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel import io.legado.app.R import io.legado.app.base.VMBaseActivity -import io.legado.app.constant.AppConst import io.legado.app.constant.BookType import io.legado.app.data.entities.BookSource 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.qrcode.QrCodeResult 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.utils.* import io.legado.app.utils.viewbindingdelegate.viewBinding @@ -447,7 +447,9 @@ class BookSourceEditActivity : override fun onHelpActionSelect(action: String) { when (action) { - "urlOption" -> sendText(AppConst.urlOption) + "urlOption" -> UrlOptionDialog(this) { + sendText(it) + }.show() "ruleHelp" -> showHelp("ruleHelp") "jsHelp" -> showHelp("jsHelp") "regexHelp" -> showHelp("regexHelp")