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-07-31 11:44:54 +03:00
parent c249cb75ef
commit 3152eeb139

View File

@ -143,13 +143,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") {