Browse Source

mailbox: show unseen message count in page title

master
Drew DeVault 4 years ago
committed by Simon Ser
parent
commit
2d86413876
No known key found for this signature in database GPG Key ID: FDE7BE0E88F5E48
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      plugins/base/routes.go

+ 4
- 0
plugins/base/routes.go View File

@@ -142,6 +142,10 @@ func handleGetMailbox(ctx *alps.Context) error {
title = "Inbox"
}

if mbox.Unseen > 0 {
title = fmt.Sprintf("(%d) %s", mbox.Unseen, title)
}

return ctx.Render(http.StatusOK, "mailbox.html", &MailboxRenderData{
BaseRenderData: *alps.NewBaseRenderData(ctx).WithTitle(title),
Mailbox: mbox,


Loading…
Cancel
Save