Fix automatic scrolling when messages arrive/leave
This commit is contained in:
parent
0494c9ae9d
commit
408a9e7b10
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue