Clear cache web view

This commit is contained in:
M66B 2023-08-13 15:01:51 +02:00
parent 84b3336afb
commit f6b7332073
2 changed files with 7 additions and 0 deletions

View File

@ -4574,6 +4574,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
properties.setHeight(message.id, null);
properties.setPosition(message.id, null, null);
if (wvBody instanceof WebViewEx)
((WebViewEx) wvBody).clearCache();
if (itemId == R.string.title_fit_width && wvBody instanceof WebView)
((WebView) wvBody).getSettings().setLoadWithOverviewMode(enabled);

View File

@ -198,6 +198,10 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
});
}
void clearCache() {
this.hash = null;
}
void setOnPageLoaded(Runnable runnable) {
Log.i("Set on page finished");
onPageLoaded = runnable;