mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 17:25:20 +00:00
UX: long-press a message to prefill @mention with sender's full nick#abcd and focus input
This commit is contained in:
@@ -354,6 +354,13 @@ struct ContentView: View {
|
||||
showMessageActions = true
|
||||
}
|
||||
}
|
||||
.onLongPressGesture(minimumDuration: 0.35) {
|
||||
// Quick @mention: prefill input with @nick#abcd
|
||||
if message.sender != "system" && message.sender != viewModel.nickname {
|
||||
messageText = "@\(message.sender) "
|
||||
isTextFieldFocused = true
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user