-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix web notification icon not updated once you read all notifications #31447
Conversation
Could you add some details about how it fixes the problem? TBH I haven't caught the point 🤣 |
I'm sorry, of course 🙂 When the number of unread notifications becomes 0, the original SQL query does not return the user's row. uidCounts, err := activities_model.GetUIDsAndNotificationCounts(ctx, then, now)
if err != nil {
log.Error("Unable to get UIDcounts: %v", err)
}
for _, uidCount := range uidCounts {
m.SendMessage(uidCount.UserID, &Event{
Name: "notification-count",
Data: uidCount,
})
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
The details could be written into comments.
I need to find out how to get the missing UIDs, but I am going to try. Thanks for the idea! |
Read the code again, it seems that it is impossible to figure out the non-existing IDs quickly. So current method should be good enough. Let's try it. |
…go-gitea#31447) Fix go-gitea#29065 Remove status filtering from GetUIDsAndNotificationCounts sql. --------- Co-authored-by: kiatt210 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
…#31447) (#31466) Backport #31447 by kiatt210 Fix #29065 Remove status filtering from GetUIDsAndNotificationCounts sql. Co-authored-by: kiatt210 <[email protected]> Co-authored-by: kiatt210 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
* giteaofficial/main: Disable issue/PR comment button given empty input (go-gitea#31463) Simplify 404/500 page (go-gitea#31409) Fix web notification icon not updated once you read all notifications (go-gitea#31447) Switch to "Write" tab when edit comment again (go-gitea#31445) Add simple JS init performance trace (go-gitea#31459)
Fix #29065
Remove status filtering from GetUIDsAndNotificationCounts sql.