Skip to content

Use the Trash as a safety net for "Cancel recording" action, with in-app notification toast #343

@nekohayo

Description

@nekohayo

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:

  1. Trash using the portal, instead of directly permanently deleting the file
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions