mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Highlight categories with unread entries
This commit is contained in:
parent
d7cf782019
commit
3ac5095776
6 changed files with 24 additions and 3 deletions
|
@ -122,11 +122,13 @@ func (s *Storage) CategoriesWithFeedCount(userID int64) (model.Categories, error
|
|||
(SELECT count(*)
|
||||
FROM feeds
|
||||
JOIN entries ON (feeds.id = entries.feed_id)
|
||||
WHERE feeds.category_id = c.id AND entries.status = 'unread')
|
||||
WHERE feeds.category_id = c.id AND entries.status = 'unread') AS count_unread
|
||||
FROM categories c
|
||||
WHERE
|
||||
user_id=$1
|
||||
ORDER BY c.title ASC
|
||||
ORDER BY
|
||||
count_unread DESC,
|
||||
c.title ASC
|
||||
`
|
||||
|
||||
rows, err := s.db.Query(query, userID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue