mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 20:45:19 +00:00
UX: remove long-press mention; add context menu 'Copy message' that copies only the message body (no nick/timestamp)
This commit is contained in:
@@ -354,11 +354,15 @@ struct ContentView: View {
|
|||||||
showMessageActions = true
|
showMessageActions = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onLongPressGesture(minimumDuration: 0.35) {
|
.contextMenu {
|
||||||
// Quick @mention: prefill input with @nick#abcd
|
Button("Copy message") {
|
||||||
if message.sender != "system" && message.sender != viewModel.nickname {
|
#if os(iOS)
|
||||||
messageText = "@\(message.sender) "
|
UIPasteboard.general.string = message.content
|
||||||
isTextFieldFocused = true
|
#else
|
||||||
|
let pb = NSPasteboard.general
|
||||||
|
pb.clearContents()
|
||||||
|
pb.setString(message.content, forType: .string)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
|
|||||||
Reference in New Issue
Block a user