aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index bbdfa57..2733288 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -27,6 +27,7 @@ type MessageStore struct {
// Map of uids we've asked the worker to fetch
onUpdate func(store *MessageStore) // TODO: multiple onUpdate handlers
+ onUpdateDirs func()
pendingBodies map[uint32]interface{}
pendingHeaders map[uint32]interface{}
worker *types.Worker
@@ -234,10 +235,17 @@ func (store *MessageStore) OnUpdate(fn func(store *MessageStore)) {
store.onUpdate = fn
}
+func (store *MessageStore) OnUpdateDirs(fn func()) {
+ store.onUpdateDirs = fn
+}
+
func (store *MessageStore) update() {
if store.onUpdate != nil {
store.onUpdate(store)
}
+ if store.onUpdateDirs != nil {
+ store.onUpdateDirs()
+ }
}
func (store *MessageStore) Delete(uids []uint32,