1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-04 22:40:32 +00:00

Prevent scale/size change invisible WebView

This commit is contained in:
M66B 2025-01-01 12:05:11 +01:00
parent 6cbb1992ce
commit 7f282c3c83

View file

@ -196,7 +196,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
@Override
public void onScaleChanged(WebView view, float oldScale, float newScale) {
Log.i("Changed scale=" + newScale);
intf.onScaleChanged(newScale);
if (getVisibility() == View.VISIBLE)
intf.onScaleChanged(newScale);
}
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
@ -290,7 +291,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
protected void onSizeChanged(int w, int h, int ow, int oh) {
super.onSizeChanged(w, h, ow, oh);
Log.i("Size changed height=" + h);
this.intf.onSizeChanged(w, h, ow, oh);
if (getVisibility() == View.VISIBLE)
this.intf.onSizeChanged(w, h, ow, oh);
}
@Override