gtauri: zero-delay handling for Android MediaStore content watcher events (immediate push)

This commit is contained in:
Greg Pomerantz 2026-11-03 09:09:34 -05:00
parent 15a857ed7f
commit 471d2faeab

View File

@ -1237,9 +1237,17 @@ fn watch_files(app: tauri::AppHandle) {
};
let do_full = matches!(woke, Some(WEvent::Full));
if let Some(WEvent::Fs) = woke {
while rx.try_recv().is_ok() {}
std::thread::sleep(std::time::Duration::from_millis(600));
while rx.try_recv().is_ok() {}
#[cfg(target_os = "android")]
{
apply_mediasotre_payload(&app);
continue;
}
#[cfg(not(target_os = "android"))]
{
while rx.try_recv().is_ok() {}
std::thread::sleep(std::time::Duration::from_millis(600));
while rx.try_recv().is_ok() {}
}
}
if do_full {
tr("watch: full rescan (5min)");