Add context menu action to delete draft

This commit is contained in:
Shadowfacts 2022-11-13 14:03:51 -05:00
parent 22b5d62ba1
commit d4fa9c96e8
1 changed files with 7 additions and 0 deletions

View File

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