fix: disable overview mode for per-app scale to take effect

This commit is contained in:
2026-08-17 20:12:21 +08:00
parent fb177cc30f
commit 69bd90d23a
@@ -43,9 +43,12 @@ class WebViewManager(private val activity: Activity) {
ua == "desktop" || ua == "pc" -> UA_DESKTOP ua == "desktop" || ua == "pc" -> UA_DESKTOP
else -> ua else -> ua
} }
// 初始缩放(1-100):用于 PC 版页面缩放适配横屏 // 初始缩放(1-100):用于 PC 版页面缩放适配横屏
// Initial zoom (1-100): scale desktop pages to fit landscape // 需关闭 overview 模式,否则 useWideViewPort+overview 会自动重新缩放并覆盖 setInitialScale
// Initial zoom (1-100): scale desktop pages to fit landscape. Must disable
// overview mode, otherwise useWideViewPort+overview re-zooms and overrides setInitialScale
if (scale != null && scale in 1..100) { if (scale != null && scale in 1..100) {
webView.settings.loadWithOverviewMode = false
webView.setInitialScale(scale) webView.setInitialScale(scale)
} }
return webView return webView