diff --git a/src-tauri/src/tray.rs b/src-tauri/src/tray.rs index d86c6d2..5c897a5 100644 --- a/src-tauri/src/tray.rs +++ b/src-tauri/src/tray.rs @@ -129,15 +129,6 @@ async fn browser_youtube_url(app: &AppHandle) -> Result { /// Arc allows this out of the box. Chrome and its relatives ship with it off, /// and say so in the error, which is passed straight back rather than being /// flattened into "something went wrong". -pub async fn run_js_logged(app: &AppHandle, browser: &str, js: &str) -> Result { - let r = run_js(browser, js).await; - match &r { - Ok(out) => log(app, &format!("js ok, {} chars back", out.len())), - Err(e) => log(app, &format!("js failed: {e}")), - } - r -} - pub async fn run_js(browser: &str, js: &str) -> Result { let safari = browser == "Safari"; let script = if safari { @@ -211,7 +202,7 @@ pub async fn scrape_subscriptions(app: &AppHandle) -> Result() .unwrap_or(0); @@ -232,7 +223,7 @@ pub async fn scrape_subscriptions(app: &AppHandle) -> Result { + const un = listen("downloads:wipe-request", () => setConfirmWipe(true)); + return () => { + void un.then((f) => f()); + }; + }, []); + // The menu bar reads the subscription list, but replacing what is here is // not a thing to agree to in a panel that closes when you look away. useEffect(() => { @@ -742,9 +751,12 @@ export default function App() { + {/* The player is deliberately not keyed on the video. Remounting would + build a new stage element, and the stage is what is fullscreen — so + every Next dropped out of fullscreen. It resets its own per-video + state instead. */} {playing && playingIndex != null && ( completely. + * Ends any Picture-in-Picture session on a