From 734fd9cdb392579bcbc34142991be519994fc414 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Wed, 12 Aug 2026 17:25:15 -0700 Subject: [PATCH] fix app build on windows & mac (#7118) --- apps/app/src/api/ads.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/app/src/api/ads.rs b/apps/app/src/api/ads.rs index 268811a929..fb5f7b32bc 100644 --- a/apps/app/src/api/ads.rs +++ b/apps/app/src/api/ads.rs @@ -187,10 +187,19 @@ async fn sync_ads_occlusion(app: &tauri::AppHandle) { state.occluded = occluded; let visible = should_show_ads_webview(&state); + let consent_overlay_shown = state.consent_overlay_shown; drop(state); if let Some(webview) = app.webviews().get("ads-window") { - set_webview_visible_for_window(app, webview, visible); + let is_minimized = app + .get_window("main") + .and_then(|window| window.is_minimized().ok()) + .unwrap_or(false); + + set_webview_visible( + webview, + visible && !is_minimized && (!occluded || consent_overlay_shown), + ); } }