Skip to content

Commit

Permalink
feat: total unread
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed May 31, 2024
1 parent 08b5f9d commit cbed6fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/load.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"strconv"
"strings"

Expand All @@ -19,7 +20,8 @@ func (m Model) loadHome() Model {
rows := []table.Row{}
for _, Feed := range m.feeds {
totalUnread := strconv.Itoa(Feed.GetTotalUnreads())
rows = append(rows, table.Row{totalUnread, Feed.Title})
fraction := fmt.Sprintf("%s/%d", totalUnread, len(Feed.Posts))
rows = append(rows, table.Row{fraction, Feed.Title})
}

m.context = "home"
Expand Down

0 comments on commit cbed6fc

Please sign in to comment.