mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +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:
parent
a2fdb61013
commit
c437a05ec0
@ -41,6 +41,10 @@ struct EventProfile: View {
|
|||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
show_profile_action_sheet_if_enabled(damus_state: damus_state, pubkey: pubkey)
|
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) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
EventProfileName(pubkey: pubkey, damus: damus_state, size: size)
|
EventProfileName(pubkey: pubkey, damus: damus_state, size: size)
|
||||||
|
@ -32,6 +32,10 @@ struct MaybeAnonPfpView: View {
|
|||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
show_profile_action_sheet_if_enabled(damus_state: state, pubkey: pubkey)
|
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))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user