aboutsummaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index f1399e4e..8f626eb8 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -249,6 +249,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
var newUids []uint32
update := false
updateThreads := false
+ directoryChange := false
start := store.scrollOffset
end := store.scrollOffset + store.scrollLen
@@ -263,6 +264,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
newMap[uid] = msg
} else {
newMap[uid] = nil
+ directoryChange = true
if i >= start && i < end {
newUids = append(newUids, uid)
}
@@ -287,6 +289,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
newMap[uid] = msg
} else {
newMap[uid] = nil
+ directoryChange = true
if i >= start && i < end {
newUids = append(newUids, uid)
}
@@ -381,6 +384,10 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
store.update(updateThreads)
}
+ if directoryChange && store.triggerDirectoryChange != nil {
+ store.triggerDirectoryChange()
+ }
+
if len(newUids) > 0 {
store.FetchHeaders(newUids, nil)
if store.triggerDirectoryChange != nil {