gtauri: zero-delay handling for Android MediaStore content watcher events (immediate push)
This commit is contained in:
parent
15a857ed7f
commit
471d2faeab
|
|
@ -1237,10 +1237,18 @@ fn watch_files(app: tauri::AppHandle) {
|
|||
};
|
||||
let do_full = matches!(woke, Some(WEvent::Full));
|
||||
if let Some(WEvent::Fs) = woke {
|
||||
#[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)");
|
||||
rescan(&app);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user