Skip to content
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 Dmail so that prior unread mail won't cause notice to appear #3414

Merged
merged 1 commit into from Dec 13, 2017

Conversation

BrokenEagle
Copy link
Collaborator

I noticed this bug recently due to leaving several Dmails unread for script testing purposes.

Basically, if you get a new mail and then hide the notice, it will set the ID to the most recent unread Dmail. However, if that message gets read, then it will no longer be the most recent unread, causing the prior ID equality check to fail, causing the user to get the unread mail notice even though there is no new mail.

So instead of checking for equality, it now checks for presence in case the cookie doesn't exist, then it checks that the most recent Dmail ID is greater than the cookie's value.

@BrokenEagle BrokenEagle changed the title Fixed Dmail so that prior unread mail won't cause notice to appear Fix Dmail so that prior unread mail won't cause notice to appear Dec 1, 2017
@r888888888 r888888888 merged commit e6482ec into danbooru:master Dec 13, 2017
@BrokenEagle BrokenEagle deleted the fix-dmail-hide-notice-bug branch December 21, 2017 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants