Skip to content

Commit 8852b8c

Browse files
committed
schema: Only reload schema file when receiving modify event
Prevents access spam on Unix platforms
1 parent aa5b80b commit 8852b8c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/gui/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,12 @@ impl eframe::App for QuickTagApp {
220220
self.reload_cache = false;
221221
}
222222

223-
if self.schemafile_update_rx.try_recv().is_ok() {
223+
if let Ok(Ok(event)) = self.schemafile_update_rx.try_recv()
224+
&& matches!(
225+
event.kind,
226+
notify::EventKind::Modify(notify::event::ModifyKind::Data(_))
227+
)
228+
{
224229
quicktag_core::classes::load_schemafile();
225230
info!("Reloaded schema file");
226231
}

0 commit comments

Comments
 (0)