about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/msgstore.go15
-rw-r--r--worker/imap/worker.go2
-rw-r--r--worker/types/messages.go7
3 files changed, 0 insertions, 24 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 709c7a2..481fcb9 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -183,7 +183,6 @@ func merge(to *models.MessageInfo, from *models.MessageInfo) {
 func (store *MessageStore) Update(msg types.WorkerMessage) {
 	update := false
 	directoryChange := false
-	requestDirInfo := false
 	switch msg := msg.(type) {
 	case *types.DirectoryInfo:
 		store.DirInfo = *msg.Info
@@ -229,7 +228,6 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
 			}
 		}
 		update = true
-		requestDirInfo = true
 	case *types.FullMessage:
 		if _, ok := store.pendingBodies[msg.Content.Uid]; ok {
 			delete(store.pendingBodies, msg.Content.Uid)
@@ -263,7 +261,6 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
 		}
 		store.uids = uids
 		update = true
-		requestDirInfo = true
 	}
 
 	if update {
@@ -273,18 +270,6 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
 	if directoryChange && store.triggerDirectoryChange != nil {
 		store.triggerDirectoryChange()
 	}
-
-	if requestDirInfo {
-		select {
-		case <-store.dirInfoUpdateDebounce.C:
-			store.worker.PostAction(&types.DirectoryInfoUpdateRequest{
-				Name: store.DirInfo.Name,
-			}, nil)
-			store.dirInfoUpdateDebounce.Reset(store.dirInfoUpdateDelay)
-		default:
-			// do nothing
-		}
-	}
 }
 
 func (store *MessageStore) OnUpdate(fn func(store *MessageStore)) {
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 1037f81..ddd95b6 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -181,8 +181,6 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error {
 		w.handleAppendMessage(msg)
 	case *types.SearchDirectory:
 		w.handleSearchDirectory(msg)
-	case *types.DirectoryInfoUpdateRequest:
-		// not implemented
 	default:
 		reterr = errUnsupported
 	}
diff --git a/worker/types/messages.go b/worker/types/messages.go
index f43ab0a..c7d5077 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -149,13 +149,6 @@ type DirectoryInfo struct {
 	Info *models.DirectoryInfo
 }
 
-// Sent whenever we assume that a directory content changed
-// workers are requested to update the DirectoryInfo to display the unread count
-type DirectoryInfoUpdateRequest struct {
-	Message
-	Name string
-}
-
 type DirectoryContents struct {
 	Message
 	Uids []uint32