Linux: file watchers skip reads, so idle apps stop rereading theme, settings and repos (L1.2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c62d548688
commit
b2e13230b5
12 files changed
+211
-9
No files matched your search
@@ -376,6 +376,10 @@ impl Desk {
|
||||
fn watch(dirs: &[PathBuf], cx: &mut Context<Desk>) -> notify::Result<RecommendedWatcher> {
|
||||
let (sender, mut changes) = mpsc::unbounded();
|
||||
let mut watcher = notify::recommended_watcher(move |event: notify::Result<notify::Event>| {
|
||||
// Reads, ours included, are no change.
|
||||
if event.as_ref().is_ok_and(|event| ely_ui::watching::only_read(&event.kind)) {
|
||||
return;
|
||||
}
|
||||
let _ = sender.unbounded_send(event.map(|_| ()).map_err(|error| error.to_string()));
|
||||
})?;
|
||||
for dir in dirs {
|
||||
|
||||
Reference in new issue
Block a user