|
@@ -33,6 +33,7 @@ import io.legado.app.ui.widget.recycler.ItemTouchCallback
|
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider
|
|
|
import io.legado.app.utils.ACache
|
|
import io.legado.app.utils.ACache
|
|
|
import io.legado.app.utils.applyTint
|
|
import io.legado.app.utils.applyTint
|
|
|
|
|
+import io.legado.app.utils.isAbsUrl
|
|
|
import io.legado.app.utils.launch
|
|
import io.legado.app.utils.launch
|
|
|
import io.legado.app.utils.readText
|
|
import io.legado.app.utils.readText
|
|
|
import io.legado.app.utils.setLayout
|
|
import io.legado.app.utils.setLayout
|
|
@@ -186,7 +187,7 @@ class TxtTocRuleDialog() : BaseDialogFragment(R.layout.dialog_toc_regex),
|
|
|
okButton {
|
|
okButton {
|
|
|
val text = alertBinding.editView.text?.toString()
|
|
val text = alertBinding.editView.text?.toString()
|
|
|
text?.let {
|
|
text?.let {
|
|
|
- if (!cacheUrls.contains(it)) {
|
|
|
|
|
|
|
+ if (it.isAbsUrl() && !cacheUrls.contains(it)) {
|
|
|
cacheUrls.add(0, it)
|
|
cacheUrls.add(0, it)
|
|
|
aCache.put(importTocRuleKey, cacheUrls.joinToString(","))
|
|
aCache.put(importTocRuleKey, cacheUrls.joinToString(","))
|
|
|
}
|
|
}
|