1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! File-system watcher integration for knotra-app.
//!
//! Provides an `iced::Subscription` that polls registered repositories for
//! sentinel file changes and emits `Message::FsChange` when a change is
//! detected. The subscription is only active when `fs_watch_enabled = true`
//! in the application config.
//!
//! # Debouncing
//!
//! The poller runs at `fs_debounce_secs` intervals. The `FsPoller` itself
//! computes the diff, so rapid consecutive polls do not flood the UI — only
//! the *first* detection of each change triggers a message.
use ;
use Duration;
use crate::;
/// The message emitted when a FS change is detected in one or more projects.
///
/// Carries the project IDs that changed so the update handler can refresh
/// only the affected projects rather than the whole workspace.
/// Build the FS-watch subscription from the current app state.
///
/// Returns `Subscription::none()` when FS watching is disabled in config.