mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-09 01:37:39 +03:00
store cache for WidgetWebView between loads
This commit is contained in:
parent
f585deb1d7
commit
5be7b1b728
1 changed files with 0 additions and 6 deletions
|
@ -36,10 +36,6 @@ fun WebView.setupForWidget(webViewEventListener: WebViewEventListener) {
|
||||||
// clear caches
|
// clear caches
|
||||||
clearHistory()
|
clearHistory()
|
||||||
clearFormData()
|
clearFormData()
|
||||||
clearCache(true)
|
|
||||||
|
|
||||||
// does not cache the data
|
|
||||||
settings.cacheMode = WebSettings.LOAD_NO_CACHE
|
|
||||||
|
|
||||||
// Enable Javascript
|
// Enable Javascript
|
||||||
settings.javaScriptEnabled = true
|
settings.javaScriptEnabled = true
|
||||||
|
@ -77,8 +73,6 @@ fun WebView.clearAfterWidget() {
|
||||||
webChromeClient = null
|
webChromeClient = null
|
||||||
webViewClient = null
|
webViewClient = null
|
||||||
clearHistory()
|
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.
|
// Loading a blank page is optional, but will ensure that the WebView isn't doing anything when you destroy it.
|
||||||
loadUrl("about:blank")
|
loadUrl("about:blank")
|
||||||
removeAllViews()
|
removeAllViews()
|
||||||
|
|
Loading…
Reference in a new issue