diff options
author | Robin Jarry <robin@jarry.cc> | 2023-06-29 16:53:38 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-04 11:32:40 +0200 |
commit | a3e811e00d8a7fe0f37d85557d7db60087967171 (patch) | |
tree | fc5e3e35487499e9b78a3f4f875f8bfb8f807526 /worker/notmuch/worker.go | |
parent | d29c9d1a2ff82234ad1810abc6a57199340e7fd5 (diff) | |
download | aerc-a3e811e00d8a7fe0f37d85557d7db60087967171.tar.gz |
watchers: move filesystem monitoring stuff in lib
No functional change. This will allow reuse in other parts of aerc.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'worker/notmuch/worker.go')
-rw-r--r-- | worker/notmuch/worker.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index 1e5f4c2d..cf58d987 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -19,6 +19,7 @@ import ( "time" "git.sr.ht/~rjarry/aerc/config" + "git.sr.ht/~rjarry/aerc/lib/watchers" "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/models" "git.sr.ht/~rjarry/aerc/worker/handlers" @@ -45,7 +46,7 @@ type worker struct { db *notmuch.DB setupErr error currentSortCriteria []*types.SortCriterion - watcher types.FSWatcher + watcher watchers.FSWatcher watcherDebounce *time.Timer capabilities *models.Capabilities headers []string @@ -55,7 +56,7 @@ type worker struct { // NewWorker creates a new notmuch worker with the provided worker. func NewWorker(w *types.Worker) (types.Backend, error) { events := make(chan eventType, 20) - watcher, err := handlers.NewWatcher() + watcher, err := watchers.NewWatcher() if err != nil { return nil, fmt.Errorf("could not create file system watcher: %w", err) } |