Show number of visible entries instead of number of read entries in feed list
This commit is contained in:
parent
2bc5ad53c2
commit
ba65556eac
3 changed files with 7 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
|
||||
</span>
|
||||
<span class="feed-entries-counter">
|
||||
(<span title="{{ t "page.feeds.unread_counter" }}">{{ .UnreadCount }}</span>/<span title="{{ t "page.feeds.read_counter" }}">{{ .ReadCount }}</span>)
|
||||
(<span title="{{ t "page.feeds.unread_counter" }}">{{ .UnreadCount }}</span>/<span>{{ .NumberOfVisibleEntries }}</span>)
|
||||
</span>
|
||||
<span class="category">
|
||||
<a href="{{ route "categoryEntries" "categoryID" .Category.ID }}">{{ .Category.Title }}</a>
|
||||
|
|
Loading…
Add table
Reference in a new issue