In #21 a direct delete action was implemented as "Cancel recording", which is great.
However, in the context of #342 today I thought, "It would be nice if there was a way for the user to undo the deletion of a recording". I was about to suggest a timer-based deletion during which undoing is possible, but then I realized there's a better way: use the operating system's trashcan! That way, users could always un-delete using Nautilus or their favorite file manager.
It turns out there is a flatpak-sandboxing-compatible portal for exactly this purpose: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Trash.html
So my thinking is:
- Trash using the portal, instead of directly permanently deleting the file
- Show a brief in-app notification toast to say that the file has been placed in the trashcan (and maybe with a "View trash" button that does
xdg-open trash:///?)
In GNOME, the trashcan can be configured to auto-empty after a certain amount of days, so it will not clutter the disk space over time anyway.