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:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-11 02:28:29 -04:00
1 parent c62d548688
commit b2e13230b5
12 files changed
+211 -9

No files matched your search

+2
View File
@@ -82,6 +82,8 @@ fn follow(cx: &mut App) -> std::io::Result<()> {
std::fs::create_dir_all(&dir)?;
let (sender, mut changes) = mpsc::unbounded();
let mut watcher = notify::recommended_watcher(move |event: notify::Result<notify::Event>| match event {
// Reads, ours included, are no change.
Ok(event) if crate::watching::only_read(&event.kind) => {}
Ok(event) if event.paths.iter().any(|changed| changed.file_name() == path.file_name()) => {
let _ = sender.unbounded_send(());
}