Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Undo notification close (history) #574#578

Open
ArijanJ wants to merge 4 commits into
ErikReider:mainErikReider/SwayNotificationCenter:mainfrom
ArijanJ:pop-historyArijanJ/SwayNotificationCenter:pop-historyCopy head branch name to clipboard
Open

Undo notification close (history) #574#578
ArijanJ wants to merge 4 commits into
ErikReider:mainErikReider/SwayNotificationCenter:mainfrom
ArijanJ:pop-historyArijanJ/SwayNotificationCenter:pop-historyCopy head branch name to clipboard

Conversation

@ArijanJ

@ArijanJ ArijanJ commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

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

ArijanJ commented Jul 10, 2025

Copy link
Copy Markdown
Contributor Author

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

@ErikReider ErikReider left a comment

Copy link
Copy Markdown
Owner

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

Comment thread src/controlCenter/controlCenter.vala Outdated
@ArijanJ
ArijanJ marked this pull request as ready for review July 14, 2025 21:21
@ArijanJ

ArijanJ commented Jul 14, 2025

Copy link
Copy Markdown
Contributor Author

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
@ArijanJ

ArijanJ commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

@ErikReider what do you think of this fairly simple method of doing it?

@ErikReider

ErikReider commented Dec 23, 2025

Copy link
Copy Markdown
Owner

Sorry for the late reply, but I'd be more comfortable getting a SQLite implementation in before this. I have a "working" initial implementation, but haven't pushed anything yet. Thoughts? :)

@ArijanJ

ArijanJ commented Dec 23, 2025

Copy link
Copy Markdown
Contributor Author

Yeah of course, whatever you decide. Do you plan on making UI for browsing through it?

@ErikReider

Copy link
Copy Markdown
Owner

Yeah of course, whatever you decide. Do you plan on making UI for browsing through it?

Initially no, but it wouldn't be difficult at all to add. I just need to make sure that everything is up to snuff before I push :)

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.