Revert "Revert "Fix tap area when mentioning users""

This reverts commit 735376b00f.
This commit is contained in:
William Casarin
2023-04-15 09:59:55 -07:00
parent 41a462871c
commit d4c8c15cc3
3 changed files with 27 additions and 15 deletions

View File

@@ -12,10 +12,20 @@ struct FollowUserView: View {
let damus_state: DamusState
static let markdown = Markdown()
@State var navigating: Bool = false
var body: some View {
let dest = ProfileView(damus_state: damus_state, pubkey: target.pubkey)
NavigationLink(destination: dest, isActive: $navigating) {
EmptyView()
}
HStack {
UserView(damus_state: damus_state, pubkey: target.pubkey)
.contentShape(Rectangle())
.onTapGesture {
navigating = true
}
FollowButtonView(target: target, follows_you: false, follow_state: damus_state.contacts.follow_state(target.pubkey))
}
@@ -33,10 +43,9 @@ struct FollowersView: View {
LazyVStack(alignment: .leading) {
ForEach(followers.contacts ?? [], id: \.self) { pk in
FollowUserView(target: .pubkey(pk), damus_state: damus_state)
Divider()
}
}
.padding()
.padding(.horizontal)
}
.navigationBarTitle(NSLocalizedString("Followers", comment: "Navigation bar title for view that shows who is following a user."))
.onAppear {