Handle external message deletions
This commit is contained in:
parent
026e8a17ca
commit
3ace4ef732
|
@ -109,7 +109,6 @@ func (ml *MessageList) Height() int {
|
|||
}
|
||||
|
||||
func (ml *MessageList) storeUpdate(store *lib.MessageStore) {
|
||||
ml.logger.Println("message store updated")
|
||||
if ml.Store() != store {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue