Fix automatic scrolling when messages arrive/leave

This commit is contained in:
Drew DeVault 2019-06-11 10:08:44 -04:00
parent 0494c9ae9d
commit 408a9e7b10
1 changed files with 2 additions and 2 deletions

View File

@ -137,12 +137,12 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) {
// for the previously selected UID.
if len(store.Uids) > ml.nmsgs && ml.nmsgs != 0 {
for i := 0; i < len(store.Uids)-ml.nmsgs; i++ {
ml.Scroll()
ml.Store().Next()
}
}
if len(store.Uids) < ml.nmsgs && ml.nmsgs != 0 {
for i := 0; i < ml.nmsgs-len(store.Uids); i++ {
ml.Scroll()
ml.Store().Prev()
}
}
ml.nmsgs = len(store.Uids)