mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-11-22 08:17:28 +00:00
feat: copy nickname from mesh peer context menu
Long-press a person in #mesh to copy their display name for /msg or sharing outside the app.
This commit is contained in:
parent
4a83845083
commit
8642d757e2
@ -34,6 +34,7 @@ struct MeshPeerList: View {
|
||||
static let directMessage = String(localized: "content.actions.direct_message", comment: "Action that opens a private chat with the person")
|
||||
static let block = String(localized: "geohash_people.action.block", comment: "Context menu action to block a person")
|
||||
static let unblock = String(localized: "geohash_people.action.unblock", comment: "Context menu action to unblock a person")
|
||||
static let copyNickname = String(localized: "mesh_peers.action.copy_nickname", comment: "Context menu action that copies a peer's display name")
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@ -189,6 +190,9 @@ struct MeshPeerList: View {
|
||||
Button(Strings.directMessage) {
|
||||
onTapPeer(peer.peerID)
|
||||
}
|
||||
Button(Strings.copyNickname) {
|
||||
NicknameClipboard.copy(peer.displayName)
|
||||
}
|
||||
Button(peer.isFavorite ? Strings.removeFavorite : Strings.addFavorite) {
|
||||
onToggleFavorite(peer.peerID)
|
||||
}
|
||||
@ -214,6 +218,9 @@ struct MeshPeerList: View {
|
||||
.accessibilityHint(isMe ? "" : Strings.openDMHint)
|
||||
.accessibilityActions {
|
||||
if !isMe {
|
||||
Button(Strings.copyNickname) {
|
||||
NicknameClipboard.copy(peer.displayName)
|
||||
}
|
||||
Button(peer.isFavorite ? Strings.removeFavorite : Strings.addFavorite) {
|
||||
onToggleFavorite(peer.peerID)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user