Add ability to disable all user notifications #3473
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to disable all the user notifications in order to combat against the ever-growing disk space generated by refreshing the user notifications.
See #2042 (comment) for more info.
About the PR I have not disabled everything when the parameter is set to false, mainly in the file https://github.com/iv-org/invidious/blob/master/src/invidious/users.cr#L133 because I fear to break something. Feel free to improve my code about that if needed.
But the basic idea is implemented, no notification items are created when the setting
enable_user_notifications
is turned off and on the UI side the user won't see any notifications anymore.A new method
feed_needs_update
in database/users.cr has been created in order to ask for Invidious to refresh the user feed without creating a new notification item.