aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msglist.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 1624e64..ea9b245 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -138,6 +138,10 @@ func (ml *MessageList) Store() *lib.MessageStore {
return ml.store
}
+func (ml *MessageList) Empty() bool {
+ return ml.store == nil || len(ml.store.Uids) == 0
+}
+
func (ml *MessageList) Selected() *types.MessageInfo {
return ml.store.Messages[ml.store.Uids[len(ml.store.Uids)-ml.selected-1]]
}