mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 13:37:29 +01:00
Remove dependency injection from core module and data module from presentation-widget module
Includes side effects: - No longer need to restart app for user agent string change to take effect - parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt
This commit is contained in:
@@ -120,7 +120,7 @@ class ExtensionDetailsScreenModel(
|
||||
|
||||
val cleared = urls.sumOf {
|
||||
try {
|
||||
network.cookieManager.remove(it.toHttpUrl())
|
||||
network.cookieJar.remove(it.toHttpUrl())
|
||||
} catch (e: Exception) {
|
||||
logcat(LogPriority.ERROR, e) { "Failed to clear cookies for $it" }
|
||||
0
|
||||
|
||||
@@ -92,7 +92,7 @@ class WebViewActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun clearCookies(url: String) {
|
||||
val cleared = network.cookieManager.remove(url.toHttpUrl())
|
||||
val cleared = network.cookieJar.remove(url.toHttpUrl())
|
||||
logcat { "Cleared $cleared cookies for: $url" }
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class WebViewScreenModel(
|
||||
}
|
||||
|
||||
fun clearCookies(url: String) {
|
||||
val cleared = network.cookieManager.remove(url.toHttpUrl())
|
||||
val cleared = network.cookieJar.remove(url.toHttpUrl())
|
||||
logcat { "Cleared $cleared cookies for: $url" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user