Skip to content

Conversation

ArijanJ
Copy link
Contributor

@ArijanJ ArijanJ commented Jul 10, 2025

Opening this PR early so we can discuss how this would ideally work. It's bound to ctrl+z for now, and so far this method looks promising, although I haven't tested it much.

For groups, I assume we would want it to undo the deletion of the entire group, and I was also curious if it's better to somehow stick the restored notifications to the top of the list. I tried this with the two commented-out lines, but might need to reposition the widget itself if we want to go this route. What do we think?

@ArijanJ
Copy link
Contributor Author

ArijanJ commented Jul 10, 2025

Maybe something like this? The problem I'm seeing with this is if you delete 3/10 notifications in a group, ctrl+z will restore all three at once instead of one by one. We might need to somehow check every single deletion and mark it as either a group-delete or a single-delete, which is likely a bit more work

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up! :D

@ArijanJ ArijanJ marked this pull request as ready for review July 14, 2025 21:21
@ArijanJ
Copy link
Contributor Author

ArijanJ commented Jul 14, 2025

I think this simple implementation should be enough for most use cases. I tried implementing full-group restore but it seems to be more complex and I'm not 100% sure on how the events propagate up from each widget/button :(

Also moved it to the on_released... callback since holding down the action had some glitches, and added the shortcut to the manpage and readme. Let me know what you think

@ArijanJ ArijanJ changed the title WIP: Undo notification close (history) #574 Undo notification close (history) #574 Aug 27, 2025
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.

2 participants