damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 031408dec3447edd4690c848e95f22438a6dd43a
parent 16b6d029fa6de269cae26acd211ee0edee07a5f1
Author: Zach Hendel <56426913+olheadinternet@users.noreply.github.com>
Date:   Sun, 15 Jan 2023 17:16:42 -0800

Makes both name and @username clickable to go to profile

Changelog-Changed: Makes both name and username clickable in sidebar to go to profile
Closes: #329

Diffstat:
Mdamus/Views/SideMenuView.swift | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/damus/Views/SideMenuView.swift b/damus/Views/SideMenuView.swift @@ -53,23 +53,23 @@ struct SideMenuView: View { let followers = FollowersModel(damus_state: damus_state, target: damus_state.pubkey) let profile_model = ProfileModel(pubkey: damus_state.pubkey, damus: damus_state) - if let picture = damus_state.profiles.lookup(id: damus_state.pubkey)?.picture { - NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) { + NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) { + if let picture = damus_state.profiles.lookup(id: damus_state.pubkey)?.picture { ProfilePicView(pubkey: damus_state.pubkey, size: 60, highlight: .none, profiles: damus_state.profiles, picture: picture) + } else { + Image(systemName: "person.fill") } - } else { - Image(systemName: "person.fill") - } - VStack(alignment: .leading) { - if let display_name = profile?.display_name { - Text(display_name) - .foregroundColor(textColor()) - .font(.title) - } - if let name = profile?.name { - Text("@" + name) - .foregroundColor(Color("DamusMediumGrey")) - .font(.body) + VStack(alignment: .leading) { + if let display_name = profile?.display_name { + Text(display_name) + .foregroundColor(textColor()) + .font(.title) + } + if let name = profile?.name { + Text("@" + name) + .foregroundColor(Color("DamusMediumGrey")) + .font(.body) + } } }