From d4fa9c96e89da5e998b62ba81792fae45f04d7dd Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 13 Nov 2022 14:03:51 -0500 Subject: [PATCH] Add context menu action to delete draft --- Tusker/Screens/Compose/DraftsView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tusker/Screens/Compose/DraftsView.swift b/Tusker/Screens/Compose/DraftsView.swift index 733d90e1..e22ff499 100644 --- a/Tusker/Screens/Compose/DraftsView.swift +++ b/Tusker/Screens/Compose/DraftsView.swift @@ -31,6 +31,13 @@ struct DraftsView: View { } label: { DraftView(draft: draft) } + .contextMenu { + Button(role: .destructive) { + draftsManager.remove(draft) + } label: { + Label("Delete Draft", systemImage: "trash") + } + } .onDrag { let activity = UserActivityManager.editDraftActivity(id: draft.id, accountID: mastodonController.accountInfo!.id) activity.displaysAuxiliaryScene = true