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:
parent
92c98bd986
commit
f6028f3863
3 changed files with 22 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue