Merge pull request #2648 from dkanada/patch-1
store cache for WidgetWebView between loads
This commit is contained in:
commit
25cb78ba50
|
@ -21,7 +21,6 @@ import android.view.ViewGroup
|
|||
import android.webkit.CookieManager
|
||||
import android.webkit.PermissionRequest
|
||||
import android.webkit.WebChromeClient
|
||||
import android.webkit.WebSettings
|
||||
import android.webkit.WebView
|
||||
import im.vector.app.R
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
|
@ -36,10 +35,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
|
||||
|
@ -78,8 +73,6 @@ fun WebView.clearAfterWidget() {
|
|||
(parent as? ViewGroup)?.removeAllViews()
|
||||
webChromeClient = 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()
|
||||
|
|
Loading…
Reference in New Issue