summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/worker.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 3d4555f..d0b0e71 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -204,6 +204,13 @@ func (w *IMAPWorker) handleImapUpdate(update client.Update) {
 			Recent: int(status.Recent),
 			Unseen: int(status.Unseen),
 		}, nil)
+	case *client.ExpungeUpdate:
+		i := update.SeqNum - 1
+		uid := w.seqMap[i]
+		w.seqMap = append(w.seqMap[:i], w.seqMap[i+1:]...)
+		w.worker.PostMessage(&types.MessagesDeleted{
+			Uids: []uint32{uid},
+		}, nil)
 	}
 }
 
a> 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
43
44
45
46
47
48
49
50
51