damus

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

commit c437a05ec0b7af36e99957fd955bf0100217615c
parent a2fdb610130a055882407f1ed68c2964f90515bc
Author: ericholguin <eric.holguinsanchez@gmail.com>
Date:   Sat, 28 Oct 2023 16:31:17 -0600

ux: add long press to profile to navigate to profile page

Closes: https://github.com/damus-io/damus/pull/1665
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Views/Events/EventProfile.swift | 4++++
Mdamus/Views/Profile/MaybeAnonPfpView.swift | 4++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/damus/Views/Events/EventProfile.swift b/damus/Views/Events/EventProfile.swift @@ -41,6 +41,10 @@ struct EventProfile: View { .onTapGesture { show_profile_action_sheet_if_enabled(damus_state: damus_state, pubkey: pubkey) } + .onLongPressGesture(minimumDuration: 0.1) { + UIImpactFeedbackGenerator(style: .medium).impactOccurred() + damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey)) + } VStack(alignment: .leading, spacing: 0) { EventProfileName(pubkey: pubkey, damus: damus_state, size: size) diff --git a/damus/Views/Profile/MaybeAnonPfpView.swift b/damus/Views/Profile/MaybeAnonPfpView.swift @@ -32,6 +32,10 @@ struct MaybeAnonPfpView: View { .onTapGesture { show_profile_action_sheet_if_enabled(damus_state: state, pubkey: pubkey) } + .onLongPressGesture(minimumDuration: 0.1) { + UIImpactFeedbackGenerator(style: .medium).impactOccurred() + state.nav.push(route: Route.ProfileByKey(pubkey: pubkey)) + } } } }