mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 10:33:41 +02:00
Double viewport height on modern devices
This commit is contained in:
@@ -68,7 +68,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
super(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
this.viewportHeight = prefs.getInt("viewport_height", DEFAULT_VIEWPORT_HEIGHT);
|
||||
this.viewportHeight = prefs.getInt("viewport_height", getDefaultViewportHeight(context));
|
||||
boolean overview_mode = prefs.getBoolean("overview_mode", false);
|
||||
boolean safe_browsing = prefs.getBoolean("safe_browsing", false);
|
||||
|
||||
@@ -471,6 +471,13 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
}
|
||||
}
|
||||
|
||||
static int getDefaultViewportHeight(Context context) {
|
||||
if (Helper.isGoogle() || Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU)
|
||||
return DEFAULT_VIEWPORT_HEIGHT * 2;
|
||||
else
|
||||
return DEFAULT_VIEWPORT_HEIGHT;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
static String getUserAgent(Context context) {
|
||||
return getUserAgent(context, null);
|
||||
|
||||
Reference in New Issue
Block a user