Fix automatic scrolling when messages arrive/leave
This commit is contained in:
parent
0494c9ae9d
commit
408a9e7b10
1 changed files with 2 additions and 2 deletions
|
@ -137,12 +137,12 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) {
|
||||||
// for the previously selected UID.
|
// for the previously selected UID.
|
||||||
if len(store.Uids) > ml.nmsgs && ml.nmsgs != 0 {
|
if len(store.Uids) > ml.nmsgs && ml.nmsgs != 0 {
|
||||||
for i := 0; i < len(store.Uids)-ml.nmsgs; i++ {
|
for i := 0; i < len(store.Uids)-ml.nmsgs; i++ {
|
||||||
ml.Scroll()
|
ml.Store().Next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(store.Uids) < ml.nmsgs && ml.nmsgs != 0 {
|
if len(store.Uids) < ml.nmsgs && ml.nmsgs != 0 {
|
||||||
for i := 0; i < ml.nmsgs-len(store.Uids); i++ {
|
for i := 0; i < ml.nmsgs-len(store.Uids); i++ {
|
||||||
ml.Scroll()
|
ml.Store().Prev()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ml.nmsgs = len(store.Uids)
|
ml.nmsgs = len(store.Uids)
|
||||||
|
|
Loading…
Reference in a new issue