diff options
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r-- | widgets/msglist.go | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go index 9e68f219..e9603cae 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -345,27 +345,7 @@ func (ml *MessageList) storeUpdate(store *lib.MessageStore) { if ml.Store() != store { return } - uids := store.Uids() - - if len(uids) > 0 { - // When new messages come in, advance the cursor accordingly - // Note that this assumes new messages are appended to the top, which - // isn't necessarily true once we implement SORT... ideally we'd look - // for the previously selected UID. - if len(uids) > ml.nmsgs && ml.nmsgs != 0 { - for i := 0; i < len(uids)-ml.nmsgs; i++ { - ml.Store().Next() - } - } - if len(uids) < ml.nmsgs && ml.nmsgs != 0 { - for i := 0; i < ml.nmsgs-len(uids); i++ { - ml.Store().Prev() - } - } - ml.nmsgs = len(uids) - } - - ml.Invalidate() + store.Reselect() } func (ml *MessageList) SetStore(store *lib.MessageStore) { |