Skip to content

Soft Delete & Swipe-to-Delete in Messaging App #79

@gmarkley-VI

Description

@gmarkley-VI

I ran into some friction with handling spam messages. The app has an Archive feature, but it didn’t have a “soft delete” or swipe-to-delete option, which are common in modern messaging UX. To explore and learn, I forked the app and implemented these features, following the code style and patterns already present.

What I’ve Built
This feature adds a Trash / Recently Deleted functionality, similar to what you’d find in many email/txt clients

Two-stage deletion – conversations first go into Trash, then are permanently removed later.
Configurable retention – choose how long messages stay in Trash (0–999 days, default 14).
Swipe-to-delete – delete conversations quickly with a swipe.
Restore option – recover accidentally deleted conversations from Trash.
Auto-cleanup – Trash empties itself automatically once the retention period expires.

How It Works

Delete a conversation → it moves to the Deleted Screen just like the Archive one.
Restore from Deleted → select and restore.
Permanently delete → delete again while in Deleted Screen.
Configure retention → Settings → Advanced → Recently deleted retention.
If retention is set to 0 days, messages are deleted immediately (skip Trash).
If set to -1, autodelete is disabled.

Technical Details

Added deleted_status and deleted_timestamp columns to DB.
Upgrade safe...
Auto-delete job runs daily at 00:05 AM and on app open
Single source of truth for retention default (14 days in constants.xml).
Behavior is safe-fail: background jobs fail gracefully, user actions have safe defaults.

I’ve been testing this on my Pixel 8 Pro and Pixel 9 Pro XL, but I’ll continue stress testing to make sure I haven’t missed anything.

Next Steps & Questions for the Community

Would this functionality be useful to others here?

I’d be happy to open a PR with these changes if the maintainers think it’s aligned with the project’s direction.

I know the core developers already have a lot on their plates, and I deeply appreciate the work that’s gone into making GrapheneOS what it is. My intent is to contribute thoughtfully, listen to feedback, and see where I can be most helpful.

Looking forward to hearing your thoughts, suggestions, and guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions