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

feat: Add ability to clear notification history #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nullromo
Copy link

@nullromo nullromo commented Feb 1, 2024

Summary

Adds the :NotificationsClear user command and the require("notify").clear_history() lua function to clear notification history.

Details

The implementation simply resets the internal notification history table to an empty table. I am not sure how this interacts with any potential asynchronous activity, but I figured that if something is waiting to be pushed into the history table, it doesn't really matter for practical purposes if it gets pushed before or after the table is reset.

I added a documentation header in the code and I updated the readme to reflect the new command and new function.

Notes

Closes #158

@invertedEcho
Copy link

What about this pull request? I would find this feature pretty useful.

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.

How do I clear Notification history?
2 participants