Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading