commit 735376b00f18216127e32a559c764b665708714a
parent 042e02d2e447c2edcca08559a90196becb482b40
Author: William Casarin <jb55@jb55.com>
Date: Fri, 14 Apr 2023 11:36:38 -0700
Revert "Fix tap area when mentioning users"
This reverts commit a2cd51b6e7fbe9810261b6590e9781e58453a265.
Diffstat:
3 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/damus/Components/UserView.swift b/damus/Components/UserView.swift
@@ -12,24 +12,22 @@ struct UserView: View {
let pubkey: String
var body: some View {
- VStack {
- HStack {
- ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
-
- VStack(alignment: .leading) {
- let profile = damus_state.profiles.lookup(id: pubkey)
- ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
- if let about = profile?.about {
- Text(about)
- .lineLimit(3)
- .font(.footnote)
- }
+ NavigationLink(destination: ProfileView(damus_state: damus_state, pubkey: pubkey)) {
+ ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
+
+ VStack(alignment: .leading) {
+ let profile = damus_state.profiles.lookup(id: pubkey)
+ ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
+ if let about = profile?.about {
+ Text(about)
+ .lineLimit(3)
+ .font(.footnote)
}
-
- Spacer()
}
+
Spacer()
}
+ .buttonStyle(PlainButtonStyle())
}
}
diff --git a/damus/Views/FollowingView.swift b/damus/Views/FollowingView.swift
@@ -12,20 +12,10 @@ 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))
}
@@ -43,9 +33,10 @@ struct FollowersView: View {
LazyVStack(alignment: .leading) {
ForEach(followers.contacts ?? [], id: \.self) { pk in
FollowUserView(target: .pubkey(pk), damus_state: damus_state)
+ Divider()
}
}
- .padding(.horizontal)
+ .padding()
}
.navigationBarTitle(NSLocalizedString("Followers", comment: "Navigation bar title for view that shows who is following a user."))
.onAppear {
diff --git a/damus/Views/Posting/UserSearch.swift b/damus/Views/Posting/UserSearch.swift
@@ -81,7 +81,6 @@ struct UserSearch: View {
} else {
ForEach(users) { user in
UserView(damus_state: damus_state, pubkey: user.pubkey)
- .contentShape(Rectangle())
.onTapGesture {
on_user_tapped(user: user)
}