fix: hide ad webview when showing fullscreen content (#7110)

* fix: hide ad webview when showing fullscreen content

* fixes
This commit is contained in:
aecsocket
2026-08-12 16:02:02 +00:00
committed by GitHub
parent c34bd26f87
commit 6ec979a076
9 changed files with 186 additions and 171 deletions
+21 -2
View File
@@ -8,8 +8,27 @@ export async function init_ads_window(overrideShown = false) {
})
}
export async function show_ads_window() {
return await invoke('plugin:ads|show_ads_window', { dpr: window.devicePixelRatio })
let adsWindowHoldUpdate = Promise.resolve()
async function update_ads_window_hold(acquire) {
adsWindowHoldUpdate = adsWindowHoldUpdate
.catch(() => {})
.then(() =>
invoke('plugin:ads|update_ads_window_hold', {
acquire,
dpr: window.devicePixelRatio,
}),
)
return await adsWindowHoldUpdate
}
export async function take_ads_window_hold() {
return await update_ads_window_hold(true)
}
export async function release_ads_window_hold() {
return await update_ads_window_hold(false)
}
export async function hide_ads_window(reset) {