From 5be7b1b7280c053ea8712c4c5bbe66a06d26d9f6 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sat, 9 Jan 2021 23:23:17 +0900 Subject: [PATCH] store cache for WidgetWebView between loads --- .../im/vector/app/features/widgets/webview/WidgetWebView.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/widgets/webview/WidgetWebView.kt b/vector/src/main/java/im/vector/app/features/widgets/webview/WidgetWebView.kt index 446bc1663f..dc59f2694f 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/webview/WidgetWebView.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/webview/WidgetWebView.kt @@ -36,10 +36,6 @@ fun WebView.setupForWidget(webViewEventListener: WebViewEventListener) { // clear caches clearHistory() clearFormData() - clearCache(true) - - // does not cache the data - settings.cacheMode = WebSettings.LOAD_NO_CACHE // Enable Javascript settings.javaScriptEnabled = true @@ -77,8 +73,6 @@ fun WebView.clearAfterWidget() { webChromeClient = null webViewClient = null clearHistory() - // NOTE: clears RAM cache, if you pass true, it will also clear the disk cache. - clearCache(true) // Loading a blank page is optional, but will ensure that the WebView isn't doing anything when you destroy it. loadUrl("about:blank") removeAllViews()