1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Improve Fever middleware and handle groupID=0

This commit is contained in:
Frédéric Guillot 2018-10-26 19:49:49 -07:00
parent 92c98bd986
commit f6028f3863
3 changed files with 22 additions and 4 deletions

View file

@ -573,7 +573,15 @@ func (c *Controller) handleWriteGroups(w http.ResponseWriter, r *http.Request) {
}
go func() {
if err := c.store.MarkCategoryAsRead(userID, groupID, before); err != nil {
var err error
if groupID == 0 {
err = c.store.MarkAllAsRead(userID)
} else {
err = c.store.MarkCategoryAsRead(userID, groupID, before)
}
if err != nil {
logger.Error("[Fever] MarkCategoryAsRead failed: %v", err)
}
}()