|
|
@@ -7,6 +7,7 @@ import io.legado.app.data.appDb
|
|
|
import io.legado.app.data.entities.BookSource
|
|
|
import io.legado.app.exception.NoStackTraceException
|
|
|
import io.legado.app.help.RuleComplete
|
|
|
+import io.legado.app.help.http.CookieStore
|
|
|
import io.legado.app.help.http.newCallStrResponse
|
|
|
import io.legado.app.help.http.okHttpClient
|
|
|
import io.legado.app.utils.*
|
|
|
@@ -95,6 +96,12 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ fun clearCookie(url: String) {
|
|
|
+ execute {
|
|
|
+ CookieStore.removeCookie(url)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
fun ruleComplete(rule: String?, preRule: String? = null, type: Int = 1): String? {
|
|
|
if (autoComplete) {
|
|
|
return RuleComplete.autoComplete(rule, preRule, type)
|