diff --git a/internal/model/feed.go b/internal/model/feed.go
index 6a76411e..c1a0384f 100644
--- a/internal/model/feed.go
+++ b/internal/model/feed.go
@@ -57,10 +57,11 @@ type Feed struct {
Icon *FeedIcon `json:"icon"`
Entries Entries `json:"entries,omitempty"`
- TTL int `json:"-"`
- IconURL string `json:"-"`
- UnreadCount int `json:"-"`
- ReadCount int `json:"-"`
+ TTL int `json:"-"`
+ IconURL string `json:"-"`
+ UnreadCount int `json:"-"`
+ ReadCount int `json:"-"`
+ NumberOfVisibleEntries int `json:"-"`
}
type FeedCounters struct {
diff --git a/internal/storage/feed_query_builder.go b/internal/storage/feed_query_builder.go
index 78b2f1bc..29926b81 100644
--- a/internal/storage/feed_query_builder.go
+++ b/internal/storage/feed_query_builder.go
@@ -253,6 +253,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
}
}
+ feed.NumberOfVisibleEntries = feed.ReadCount + feed.UnreadCount
feed.CheckedAt = timezone.Convert(tz, feed.CheckedAt)
feed.NextCheckAt = timezone.Convert(tz, feed.NextCheckAt)
feed.Category.UserID = feed.UserID
diff --git a/internal/template/templates/common/feed_list.html b/internal/template/templates/common/feed_list.html
index 04985207..2caaabf6 100644
--- a/internal/template/templates/common/feed_list.html
+++ b/internal/template/templates/common/feed_list.html
@@ -11,7 +11,7 @@
{{ .Title }}
- ({{ .UnreadCount }}/{{ .ReadCount }})
+ ({{ .UnreadCount }}/{{ .NumberOfVisibleEntries }})
{{ .Category.Title }}