1
0
mirror of git://jb55.com/damus synced 2024-09-16 02:03:45 +00:00

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>
This commit is contained in:
ericholguin 2023-10-28 16:31:17 -06:00 committed by William Casarin
parent a2fdb61013
commit c437a05ec0
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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))
}
}
}
}