diff options
Diffstat (limited to 'widgets')
| -rw-r--r-- | widgets/msglist.go | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go index 8f5a06e..90cfe33 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -115,12 +115,35 @@ func (ml *MessageList) Draw(ctx *ui.Context) { // unread message seen := false flagged := false + important := false + list := false + food := false + personal := false + work := false + physics := false + todo := false + later := false for _, flag := range msg.Flags { switch flag { case models.SeenFlag: seen = true case models.FlaggedFlag: flagged = true + // NOTE(shivesh): my custom flags + case models.ImportantFlag: + important = true + case models.ListFlag: + list = true + case models.PersonalFlag: + personal = true + case models.WorkFlag: + work = true + case models.PhysicsFlag: + physics = true + case models.TodoFlag: + todo = true + case models.LaterFlag: + later = true } } @@ -133,6 +156,30 @@ func (ml *MessageList) Draw(ctx *ui.Context) { if flagged { msg_styles = append(msg_styles, config.STYLE_MSGLIST_FLAGGED) } + if important { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_IMPORTANT) + } + if list { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_LIST) + } + if food { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_FOOD) + } + if personal { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_PERSONAL) + } + if work { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_WORK) + } + if physics { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_PHYSICS) + } + if todo { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_TODO) + } + if later { + msg_styles = append(msg_styles, config.STYLE_MSGLIST_LATER) + } // deleted message if _, ok := store.Deleted[msg.Uid]; ok { |
