damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 76ae4440248ba3c2e0a703c3bc14b75fa2134029
parent 5885859a48286fe9463ea6e95584c20f69a345f8
Author: Nitesh Balusu <niteshbalusu@icloud.com>
Date:   Mon, 19 Dec 2022 23:43:48 -0500

add press and hold to copy/share

Signed-off-by: Nitesh Balusu <niteshbalusu@icloud.com>

Diffstat:
Mdamus/Views/ConfigView.swift | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift @@ -36,6 +36,13 @@ struct ConfigView: View { UIPasteboard.general.string = state.keypair.pubkey_bech32 AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) } + .clipShape(RoundedRectangle(cornerRadius: 5)) + .gesture( + LongPressGesture(minimumDuration: 1.0) + .onEnded { _ in + UIPasteboard.general.string = state.keypair.pubkey_bech32 + } + ) } if let sec = state.keypair.privkey_bech32 { @@ -47,6 +54,13 @@ struct ConfigView: View { UIPasteboard.general.string = sec AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) } + .clipShape(RoundedRectangle(cornerRadius: 5)) + .gesture( + LongPressGesture(minimumDuration: 1.0) + .onEnded { _ in + UIPasteboard.general.string = sec + } + ) } if isHidden == true {