mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-08-15 07:06:11 +00:00
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:
parent
c249cb75ef
commit
3152eeb139
@ -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") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user