mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: WebViewActivity try to clear cookie of an intent instead of http(s)
This commit is contained in:
parent
6513d43f6e
commit
18bc9e459c
1 changed files with 7 additions and 2 deletions
|
@ -177,8 +177,13 @@ open class WebViewActivity : BaseWebViewActivity() {
|
|||
|
||||
private fun clearCookies() {
|
||||
val url = binding.webview.url ?: return
|
||||
val cleared = network.cookieJar.remove(url.toHttpUrl())
|
||||
toast("Cleared $cleared cookies for: $url")
|
||||
try {
|
||||
val cleared = network.cookieJar.remove(url.toHttpUrl())
|
||||
toast("Cleared $cleared cookies for: $url")
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Logger.w(e) { "Somehow getting non http url: $url" }
|
||||
toast("Unable to clear cookies for: $url (Invalid url)")
|
||||
}
|
||||
}
|
||||
|
||||
private fun openUrlInApp() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue