Click pfp in side menu should open profile as well
Closes: #323 Changelog-Changed: Clicking pfp in sidebar opens profile as well
This commit is contained in:
committed by
William Casarin
parent
9eb39f7e0a
commit
4b5c34b4e2
@@ -50,9 +50,13 @@ struct SideMenuView: View {
|
|||||||
|
|
||||||
VStack(alignment: .leading, spacing: 20) {
|
VStack(alignment: .leading, spacing: 20) {
|
||||||
let profile = damus_state.profiles.lookup(id: damus_state.pubkey)
|
let profile = damus_state.profiles.lookup(id: damus_state.pubkey)
|
||||||
|
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 {
|
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)
|
NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) {
|
||||||
|
ProfilePicView(pubkey: damus_state.pubkey, size: 60, highlight: .none, profiles: damus_state.profiles, picture: picture)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Image(systemName: "person.fill")
|
Image(systemName: "person.fill")
|
||||||
}
|
}
|
||||||
@@ -87,9 +91,6 @@ struct SideMenuView: View {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// THERE IS A LIMIT OF 10 NAVIGATIONLINKS!!! (Consider some in other views)
|
// THERE IS A LIMIT OF 10 NAVIGATIONLINKS!!! (Consider some in other views)
|
||||||
|
|
||||||
let followers = FollowersModel(damus_state: damus_state, target: damus_state.pubkey)
|
|
||||||
let profile_model = ProfileModel(pubkey: damus_state.pubkey, damus: damus_state)
|
|
||||||
|
|
||||||
NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) {
|
NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) {
|
||||||
Label(NSLocalizedString("Profile", comment: "Sidebar menu label for Profile view."), systemImage: "person")
|
Label(NSLocalizedString("Profile", comment: "Sidebar menu label for Profile view."), systemImage: "person")
|
||||||
|
|||||||
Reference in New Issue
Block a user