Skip to content

Commit

Permalink
ux: add long press to profile to navigate to profile page
Browse files Browse the repository at this point in the history
Closes: #1665
Reviewed-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
ericholguin authored and jb55 committed Oct 30, 2023
1 parent a2fdb61 commit c437a05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions damus/Views/Events/EventProfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions damus/Views/Profile/MaybeAnonPfpView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
}
Expand Down

0 comments on commit c437a05

Please sign in to comment.