From f9f6ffc71e5e8e027a264623d521dbd8935742ba Mon Sep 17 00:00:00 2001 From: Tyler Baker <91493312+btylerh7@users.noreply.github.com> Date: Sat, 7 Jan 2023 11:56:24 -0500 Subject: [PATCH] Update StatusRowContextMenu to include a "Copy Text" option (#36) * Add option to re-hide spoiler content after expanding Uses the same logic as the "Show more" button, but in reverse. This allows a user to hide the content that they expanded. * Use .toggle() method instead of multiple if statements * Update StatusRowContextMenu to have Copy Text option * Update pasteboard string to contain rawText status --- .../Status/Sources/Status/Row/StatusRowContextMenu.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Packages/Status/Sources/Status/Row/StatusRowContextMenu.swift b/Packages/Status/Sources/Status/Row/StatusRowContextMenu.swift index 5aa56ec5..a8698c04 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowContextMenu.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowContextMenu.swift @@ -49,6 +49,12 @@ struct StatusRowContextMenu: View { Label("View in Browser", systemImage: "safari") } } + + Button { + UIPasteboard.general.string = viewModel.status.content.asRawText + } label: { + Label("Copy Text", systemImage: "doc.on.doc") + } if account.account?.id == viewModel.status.account.id { Section("Your post") {