feat: add quote-in-composer beside copy on message context menu

Keeps an existing draft and inserts a sender-attributed quote block
so replies can reference nearby chat without retyping.
This commit is contained in:
Taksh 2026-10-05 16:16:06 +05:30
parent c7b7e25708
commit 5d73d58cb0

View File

@ -144,13 +144,23 @@ struct MessageListView: View {
}
}
Button("content.message.copy") {
#if os(iOS)
UIPasteboard.general.string = message.content
#else
let pb = NSPasteboard.general
pb.clearContents()
pb.setString(message.content, forType: .string)
#endif
MessageClipboard.copyPlaintext(message.content)
}
if !message.content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty,
message.sender != "system" {
Button {
messageText = MessageClipboard.appendQuote(
to: messageText,
content: message.content,
sender: message.sender
)
} label: {
Text(String(
localized: "content.message.quote",
defaultValue: "quote in composer",
comment: "Context menu action that inserts a quoted copy of the message into the composer draft"
))
}
}
if isResendableFailedMessage(message) {
Button("content.actions.resend") {