Fixed sharkey randomly clearing notifications
What does this PR do? (Please give us a brief description of what this PR does.) The PR makes it so notifications don't randomly get marked as read and are only marked as read when the mark all as read button is pressed. More info in the issue here Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines
-
I agree to follow this project's Contribution Guidelines -
I have made sure to test this pull request
Merge request reports
Activity
added bug bugfrontend labels
this is enough to not bump the "latest read notification" value in the backend when showing the widget, but it will still be bumped whenever a new notification arrives and the page is visible.
That happens because of https://activitypub.software/TransFem-org/Sharkey/-/blob/develop/packages/frontend/src/components/MkNotifications.vue#L65-74 which sends that
readNotification
event to the backend; it's handled by https://activitypub.software/TransFem-org/Sharkey/-/blob/develop/packages/backend/src/server/api/stream/Connection.ts#L165-168I don't know if you want to change that behaviour as well in this PR, or if you want to do it together with the more granular handling of
latestReadNotification
also https://activitypub.software/TransFem-org/Sharkey/-/blob/develop/packages/frontend/src/ui/common/common.vue#L73-91
40 41 import { infoImageUrl } from '@/instance.js'; 41 42 import { defaultStore } from '@/store.js'; 42 43 import MkPullToRefresh from '@/components/MkPullToRefresh.vue'; 43 import * as Misskey from 'misskey-js'; From my tests it seems less random. Are there any specific tests I should try? Its a bit hard to test on a local instance where I don't get a lot of notifications so I'm sending a lot of test notifications. But also telling it to not clear in this case would only make it clear less not more randomly