There should be no popup, and unread icons should stop being unread.
This should be fixed before 3.1 is final, as ajax is wrongly used here.
I'm not sure what to do with the popup but this small change I quickly made (it's only for the "mark all read" link right now) would at least take care of the refresh:
Actually, this should take care of the popup message and the refresh:
If that's okay I'll quickly create a patch and open a PR.
I think the intention of ajax is to not reload the page. Otherwise we could do it much more easily just in PHP (either a redirect or just mark the contents read before the page is loaded and display the contents again rather than the trigger_error).
What do you guys think about this implementation?
That looks better to me. If you submit a PR I'll test it tonight.
More info in the PR